1. 03 Jun, 2022 40 commits
    • Linus Torvalds's avatar
      Merge tag 'ptrace_stop-cleanup-for-v5.19' of... · 67850b7b
      Linus Torvalds authored
      Merge tag 'ptrace_stop-cleanup-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace
      
      Pull ptrace_stop cleanups from Eric Biederman:
       "While looking at the ptrace problems with PREEMPT_RT and the problems
        Peter Zijlstra was encountering with ptrace in his freezer rewrite I
        identified some cleanups to ptrace_stop that make sense on their own
        and move make resolving the other problems much simpler.
      
        The biggest issue is the habit of the ptrace code to change
        task->__state from the tracer to suppress TASK_WAKEKILL from waking up
        the tracee. No other code in the kernel does that and it is straight
        forward to update signal_wake_up and friends to make that unnecessary.
      
        Peter's task freezer sets frozen tasks to a new state TASK_FROZEN and
        then it stores them by calling "wake_up_state(t, TASK_FROZEN)" relying
        on the fact that all stopped states except the special stop states can
        tolerate spurious wake up and recover their state.
      
        The state of stopped and traced tasked is changed to be stored in
        task->jobctl as well as in task->__state. This makes it possible for
        the freezer to recover tasks in these special states, as well as
        serving as a general cleanup. With a little more work in that
        direction I believe TASK_STOPPED can learn to tolerate spurious wake
        ups and become an ordinary stop state.
      
        The TASK_TRACED state has to remain a special state as the registers
        for a process are only reliably available when the process is stopped
        in the scheduler. Fundamentally ptrace needs acess to the saved
        register values of a task.
      
        There are bunch of semi-random ptrace related cleanups that were found
        while looking at these issues.
      
        One cleanup that deserves to be called out is from commit 57b6de08
        ("ptrace: Admit ptrace_stop can generate spuriuos SIGTRAPs"). This
        makes a change that is technically user space visible, in the handling
        of what happens to a tracee when a tracer dies unexpectedly. According
        to our testing and our understanding of userspace nothing cares that
        spurious SIGTRAPs can be generated in that case"
      
      * tag 'ptrace_stop-cleanup-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
        sched,signal,ptrace: Rework TASK_TRACED, TASK_STOPPED state
        ptrace: Always take siglock in ptrace_resume
        ptrace: Don't change __state
        ptrace: Admit ptrace_stop can generate spuriuos SIGTRAPs
        ptrace: Document that wait_task_inactive can't fail
        ptrace: Reimplement PTRACE_KILL by always sending SIGKILL
        signal: Use lockdep_assert_held instead of assert_spin_locked
        ptrace: Remove arch_ptrace_attach
        ptrace/xtensa: Replace PT_SINGLESTEP with TIF_SINGLESTEP
        ptrace/um: Replace PT_DTRACE with TIF_SINGLESTEP
        signal: Replace __group_send_sig_info with send_signal_locked
        signal: Rename send_signal send_signal_locked
      67850b7b
    • Linus Torvalds's avatar
      Merge tag 'kthread-cleanups-for-v5.19' of... · 1ec6574a
      Linus Torvalds authored
      Merge tag 'kthread-cleanups-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace
      
      Pull kthread updates from Eric Biederman:
       "This updates init and user mode helper tasks to be ordinary user mode
        tasks.
      
        Commit 40966e31 ("kthread: Ensure struct kthread is present for
        all kthreads") caused init and the user mode helper threads that call
        kernel_execve to have struct kthread allocated for them. This struct
        kthread going away during execve in turned made a use after free of
        struct kthread possible.
      
        Here, commit 343f4c49 ("kthread: Don't allocate kthread_struct for
        init and umh") is enough to fix the use after free and is simple
        enough to be backportable.
      
        The rest of the changes pass struct kernel_clone_args to clean things
        up and cause the code to make sense.
      
        In making init and the user mode helpers tasks purely user mode tasks
        I ran into two complications. The function task_tick_numa was
        detecting tasks without an mm by testing for the presence of
        PF_KTHREAD. The initramfs code in populate_initrd_image was using
        flush_delayed_fput to ensuere the closing of all it's file descriptors
        was complete, and flush_delayed_fput does not work in a userspace
        thread.
      
        I have looked and looked and more complications and in my code review
        I have not found any, and neither has anyone else with the code
        sitting in linux-next"
      
      * tag 'kthread-cleanups-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
        sched: Update task_tick_numa to ignore tasks without an mm
        fork: Stop allowing kthreads to call execve
        fork: Explicitly set PF_KTHREAD
        init: Deal with the init process being a user mode process
        fork: Generalize PF_IO_WORKER handling
        fork: Explicity test for idle tasks in copy_thread
        fork: Pass struct kernel_clone_args into copy_thread
        kthread: Don't allocate kthread_struct for init and umh
      1ec6574a
    • Linus Torvalds's avatar
      Merge tag 'per-namespace-ipc-sysctls-for-v5.19' of... · 1888e9b4
      Linus Torvalds authored
      Merge tag 'per-namespace-ipc-sysctls-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace
      
      Pull ipc sysctl namespace updates from Eric Biederman:
       "This updates the ipc sysctls so that they are fundamentally per ipc
        namespace. Previously these sysctls depended upon a hack to simulate
        being per ipc namespace by looking up the ipc namespace in read or
        write. With this set of changes the ipc sysctls are registered per ipc
        namespace and open looks up the ipc namespace.
      
        Not only does this series of changes ensure the traditional binding at
        open time happens, but it sets a foundation for being able to relax
        the permission checks to allow a user namspace root to change the ipc
        sysctls for an ipc namespace that the user namespace root requires. To
        do this requires the ipc namespace to be known at open time"
      
      * tag 'per-namespace-ipc-sysctls-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
        ipc: Remove extra braces
        ipc: Check permissions for checkpoint_restart sysctls at open time
        ipc: Remove extra1 field abuse to pass ipc namespace
        ipc: Use the same namespace to modify and validate
        ipc: Store ipc sysctls in the ipc namespace
        ipc: Store mqueue sysctls in the ipc namespace
      1888e9b4
    • Linus Torvalds's avatar
      firmware_loader: enable XZ by default if compressed support is enabled · 07953c54
      Linus Torvalds authored
      Commit 23cfbc6e ("firmware: Add the support for ZSTD-compressed
      firmware files") added support for ZSTD compression, but in the process
      also made the previously default XZ compression a config option.
      
      That means that anybody who upgrades their kernel and does a
      
          make oldconfig
      
      to update their configuration, will end up without the XZ compression
      that the configuration used to have.
      
      Add the 'default y' to make sure this doesn't happen.
      
      The whole compression question should probably be improved upon, since
      it is now possible to "enable" compression in the kernel config but not
      enable any actual compression algorithm, which makes it all very
      useless.  It makes no sense to ask Kconfig questions that enable
      situations that are nonsensical like that.
      
      This at least fixes the immediate problem of a kernel update resulting
      in a nonbootable machine because of a missed option.
      
      Fixes: 23cfbc6e ("firmware: Add the support for ZSTD-compressed  firmware files")
      Cc: Takashi Iwai <tiwai@suse.de>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      07953c54
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs · 744983d8
      Linus Torvalds authored
      Pull JFFS2, UBI and UBIFS updates from Richard Weinberger:
       "JFFS2:
         - Fixes for a memory leak
      
        UBI:
         - Fixes for fastmap (UAF, high CPU usage)
      
        UBIFS:
         - Minor cleanups"
      
      * tag 'for-linus-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs:
        ubi: ubi_create_volume: Fix use-after-free when volume creation failed
        ubi: fastmap: Check wl_pool for free peb before wear leveling
        ubi: fastmap: Fix high cpu usage of ubi_bgt by making sure wl_pool not empty
        ubifs: Use NULL instead of using plain integer as pointer
        ubifs: Simplify the return expression of run_gc()
        jffs2: fix memory leak in jffs2_do_fill_super
        jffs2: Use kzalloc instead of kmalloc/memset
      744983d8
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml · 4e583ff9
      Linus Torvalds authored
      Pull UML updates from Richard Weinberger:
      
       - Various cleanups and fixes: xterm, serial line, time travel
      
       - Set ARCH_HAS_GCOV_PROFILE_ALL
      
      * tag 'for-linus-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
        um: Fix out-of-bounds read in LDT setup
        um: chan_user: Fix winch_tramp() return value
        um: virtio_uml: Fix broken device handling in time-travel
        um: line: Use separate IRQs per line
        um: Enable ARCH_HAS_GCOV_PROFILE_ALL
        um: Use asm-generic/dma-mapping.h
        um: daemon: Make default socket configurable
        um: xterm: Make default terminal emulator configurable
      4e583ff9
    • Linus Torvalds's avatar
      Merge tag 'devicetree-fixes-for-5.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · a01fe7ec
      Linus Torvalds authored
      Pull devicetree fixes from Rob Herring:
      
       - Fixes for unevaluatedProperties warnings.
      
         These were missed to due to a bug in dtschema which is now fixed. The
         changes involve either adding missing properties or removing spurious
         properties from examples.
      
       - Update several Qualcomm binding maintainer email addresses
      
       - Fix typo in imx8mp-media-blk-ctrl example
      
       - Fix fixed string pattern in qcom,smd
      
       - Correct the order of 'reg' entries in Xilinx PCI binding
      
      * tag 'devicetree-fixes-for-5.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        dt-bindings: mtd: spi-nand: Add spi-peripheral-props.yaml reference
        dt-bindings: memory-controllers: ingenic: Split out child node properties
        dt-bindings: net/dsa: Add spi-peripheral-props.yaml references
        dt-bindings: PCI: apple: Add missing 'power-domains' property
        dt-bindings: Update Sibi Sankar's email address
        dt-bindings: clock: Update my email address
        dt-bindings: PCI: xilinx-cpm: Fix reg property order
        dt-bindings: net: Fix unevaluatedProperties warnings in examples
        dt-bindings: PCI: socionext,uniphier-pcie: Add missing child interrupt controller
        dt-bindings: usb: snps,dwc3: Add missing 'dma-coherent' property
        dt-bindings: soc: imx8mp-media-blk-ctrl: Fix DT example
        dt-bindings: soc: qcom,smd: do not use pattern for simple rpm-requests string
      a01fe7ec
    • Linus Torvalds's avatar
      Merge tag 'arm-multiplatform-5.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 9af13088
      Linus Torvalds authored
      Pull yet more ARM multiplatform updates from Arnd Bergmann:
       "This is the third and final bit of the multiplatform conversion for
        ARMv5, finishing off OMAP1. One patch enables the common-clk
        interface, and the other ones does the Kconfig change.
      
        These were waiting on a few dependencies to trickle in for common-clk,
        and the last one of those was in the USB tree"
      
      * tag 'arm-multiplatform-5.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
        ARM: omap1: enable multiplatform
        ARM: OMAP1: clock: Convert to CCF
      9af13088
    • Linus Torvalds's avatar
      Merge tag 'loongarch-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic · c6f2f3e2
      Linus Torvalds authored
      Pull initial Loongarch architecture code from Arnd Bergmann:
       "This is the majority of the loongarch architecture code, including the
        final system call interface and all core functionality.
      
        It still misses three sets of peripheral but vital patches to add
        support for other subsystems, which have yet to pass review:
      
         - The drivers/firmware/efi stub for booting from a standard UEFI
           firmware implementation. Both the original custom boot interface
           and a draft implementation of the EFI stub did not make it, so it
           is currently impossible to boot the kernel, until the loongarch
           specific portions get accepted into the UEFI subsystem
      
         - The drivers/irqchip/irq-loongson-*.c drivers are shared with the
           the MIPS port, but currently lack support for ACPI based booting,
           which will get merged through the irqchip subsystem.
      
         - Similarly, the drivers/pci/controller/pci-loongson.c needs to be
           modified for ACPI support, which will be merged through the PCI
           subsystem.
      
        While the port cannot actually be used before all the above are
        merged, having it in 5.19 helps to establish the user space ABI for
        the libc ports to build on, and to help any treewide changes in the
        mainline kernel get applied here as well.
      
        A gcc-12 based tool chains for build testing is now included in
      
          https://mirrors.edge.kernel.org/pub/tools/crosstool/"
      
      Original description from Huacai Chen:
       "LoongArch is a new RISC ISA, which is a bit like MIPS or RISC-V.
        LoongArch includes a reduced 32-bit version (LA32R), a standard 32-bit
        version (LA32S) and a 64-bit version (LA64). LoongArch use ACPI as its
        boot protocol LoongArch-specific interrupt controllers (similar to APIC)
        are already added in the next revision of ACPI Specification (current
        revision is 6.4).
      
        This patchset is adding basic LoongArch support in mainline kernel, we
        can see a complete snapshot here:
      
          https://github.com/loongson/linux/tree/loongarch-next
          https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson.git/log/?h=loongarch-next
      
        Cross-compile tool chain to build kernel:
      
          https://github.com/loongson/build-tools/releases/download/2021.12.21/loongarch64-clfs-2022-03-03-cross-tools-gcc-glibc.tar.xz
      
        A CLFS-based Linux distro:
      
          https://github.com/loongson/build-tools/releases/download/2021.12.21/loongarch64-clfs-system-2022-03-03.tar.bz2
      
        Open-source tool chain which is under review (Binutils and Gcc are already upstream):
      
          https://github.com/loongson/binutils-gdb/tree/upstream_v3.1
          https://github.com/loongson/gcc/tree/loongarch_upstream_v6.3
          https://github.com/loongson/glibc/tree/loongarch_2_35_dev_v2.2
      
        Loongson and LoongArch documentations:
      
          https://github.com/loongson/LoongArch-Documentation
      
        LoongArch-specific interrupt controllers:
      
          https://mantis.uefi.org/mantis/view.php?id=2203
          https://mantis.uefi.org/mantis/view.php?id=2313"
      
      Link: https://lore.kernel.org/lkml/20220603072053.35005-1-chenhuacai@loongson.cn/
      
      * tag 'loongarch-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: (24 commits)
        MAINTAINERS: Add maintainer information for LoongArch
        LoongArch: Add Loongson-3 default config file
        LoongArch: Add Non-Uniform Memory Access (NUMA) support
        LoongArch: Add multi-processor (SMP) support
        LoongArch: Add VDSO and VSYSCALL support
        LoongArch: Add some library functions
        LoongArch: Add misc common routines
        LoongArch: Add ELF and module support
        LoongArch: Add signal handling support
        LoongArch: Add system call support
        LoongArch: Add memory management
        LoongArch: Add process management
        LoongArch: Add exception/interrupt handling
        LoongArch: Add boot and setup routines
        LoongArch: Add other common headers
        LoongArch: Add atomic/locking headers
        LoongArch: Add CPU definition headers
        LoongArch: Add build infrastructure
        LoongArch: Add writecombine support for drm
        LoongArch: Add ELF-related definitions
        ...
      c6f2f3e2
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 21873bd6
      Linus Torvalds authored
      Pull arm64 fixes from Catalin Marinas:
       "Most of issues addressed were introduced during this merging window.
      
         - Initialise jump labels before setup_machine_fdt(), needed by commit
           f5bda35f ("random: use static branch for crng_ready()").
      
         - Sparse warnings: missing prototype, incorrect __user annotation.
      
         - Skip SVE kselftest if not sufficient vector lengths supported"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        kselftest/arm64: signal: Skip SVE signal test if not enough VLs supported
        arm64: Initialize jump labels before setup_machine_fdt()
        arm64: hibernate: Fix syntax errors in comments
        arm64: Remove the __user annotation for the restore_za_context() argument
        ftrace/fgraph: fix increased missing-prototypes warnings
      21873bd6
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-5.19-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · f66e797b
      Linus Torvalds authored
      Pull more RISC-V updates from Palmer Dabbelt:
       "This is mostly some DT updates, but also a handful of cleanups and
        some fixes. The most user-visible of those are:
      
         - A device tree for the Sundance Polarberry, along with a handful of
           fixes and clenups to the PolarFire SOC device trees and bindings.
      
         - The memfd_secret syscall number is now visible to userspace,
      
         - Some improvements to the vm layout dump, which really should have
           followed shortly after the sv48 patches but I missed"
      
      * tag 'riscv-for-linus-5.19-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        riscv: Move alternative length validation into subsection
        riscv: mm: init: make pt_ops_set_[early|late|fixmap] static
        riscv: move errata/ and kvm/ builds to arch/riscv/Kbuild
        RISC-V: Mark IORESOURCE_EXCLUSIVE for reserved mem instead of IORESOURCE_BUSY
        riscv: Wire up memfd_secret in UAPI header
        riscv: Fix irq_work when SMP is disabled
        riscv: Improve virtual kernel memory layout dump
        riscv: Initialize thread pointer before calling C functions
        Documentation: riscv: Add sv48 description to VM layout
        RISC-V: Only default to spinwait on SBI-0.1 and M-mode
        riscv: dts: icicle: sort nodes alphabetically
        riscv: microchip: icicle: readability fixes
        riscv: dts: microchip: add the sundance polarberry
        dt-bindings: riscv: microchip: add polarberry compatible string
        dt-bindings: vendor-prefixes: add Sundance DSP
        riscv: dts: microchip: make the fabric dtsi board specific
        dt-bindings: riscv: microchip: document icicle reference design
        riscv: dts: microchip: remove soc vendor from filenames
        riscv: dts: microchip: move sysctrlr out of soc bus
        riscv: dts: microchip: remove icicle memory clocks
      f66e797b
    • Linus Torvalds's avatar
      Merge tag 's390-5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 4ab6cfc4
      Linus Torvalds authored
      Pull more s390 updates from Heiko Carstens:
       "Just a couple of small improvements, bug fixes and cleanups:
      
         - Add Eric Farman as maintainer for s390 virtio drivers.
      
         - Improve machine check handling, and avoid incorrectly injecting a
           machine check into a kvm guest.
      
         - Add cond_resched() call to gmap page table walker in order to avoid
           possible huge latencies. Also use non-quiesing sske instruction to
           speed up storage key handling.
      
         - Add __GFP_NORETRY to KEXEC_CONTROL_MEMORY_GFP so s390 behaves
           similar like common code.
      
         - Get sie control block address from correct stack slot in perf event
           code. This fixes potential random memory accesses.
      
         - Change uaccess code so that the exception handler sets the result
           of get_user() and __get_kernel_nofault() to zero in case of a
           fault. Until now this was done via input parameters for inline
           assemblies. Doing it via fault handling is what most or even all
           other architectures are doing.
      
         - Couple of other small cleanups and fixes"
      
      * tag 's390-5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/stack: add union to reflect kvm stack slot usages
        s390/stack: merge empty stack frame slots
        s390/uaccess: whitespace cleanup
        s390/uaccess: use __noreturn instead of __attribute__((noreturn))
        s390/uaccess: use exception handler to zero result on get_user() failure
        s390/uaccess: use symbolic names for inline assembler operands
        s390/mcck: isolate SIE instruction when setting CIF_MCCK_GUEST flag
        s390/mm: use non-quiescing sske for KVM switch to keyed guest
        s390/gmap: voluntarily schedule during key setting
        MAINTAINERS: Update s390 virtio-ccw
        s390/kexec: add __GFP_NORETRY to KEXEC_CONTROL_MEMORY_GFP
        s390/Kconfig.debug: fix indentation
        s390/Kconfig: fix indentation
        s390/perf: obtain sie_block from the right address
        s390: generate register offsets into pt_regs automatically
        s390: simplify early program check handler
        s390/crypto: fix scatterwalk_unmap() callers in AES-GCM
      4ab6cfc4
    • Linus Torvalds's avatar
      Merge tag 'efi-next-for-v5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi · 93ce7948
      Linus Torvalds authored
      Pull more EFI updates from Ard Biesheuvel:
       "Follow-up tweaks for EFI changes - they mostly address issues
        introduced this merge window, except for Heinrich's patch:
      
         - fix new DXE service invocations for mixed mode
      
         - use correct Kconfig symbol when setting PE header flag
      
         - clean up the drivers/firmware/efi Kconfig dependencies so that
           features that depend on CONFIG_EFI are hidden from the UI when the
           symbol is not enabled.
      
        Also included is a RISC-V bugfix from Heinrich to avoid read-write
        mappings of read-only firmware regions in the EFI page tables"
      
      * tag 'efi-next-for-v5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi:
        efi: clean up Kconfig dependencies on CONFIG_EFI
        efi/x86: libstub: Make DXE calls mixed mode safe
        efi: x86: Fix config name for setting the NX-compatibility flag in the PE header
        riscv: read-only pages should not be writable
      93ce7948
    • Saravana Kannan's avatar
      driver core: Set default deferred_probe_timeout back to 0. · 9be4cbd0
      Saravana Kannan authored
      Since we had to effectively reverted
      commit 35a67236 ("driver core: Ensure wait_for_device_probe() waits
      until the deferred_probe_timeout fires") in an earlier patch, a non-zero
      deferred_probe_timeout will break NFS rootfs mounting [1] again. So, set
      the default back to zero until we can fix that.
      
      [1] - https://lore.kernel.org/lkml/TYAPR01MB45443DF63B9EF29054F7C41FD8C60@TYAPR01MB4544.jpnprd01.prod.outlook.com/
      
      Fixes: 2b28a1a8 ("driver core: Extend deferred probe timeout on driver registration")
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Rob Herring <robh@kernel.org>
      Reported-by: default avatarNathan Chancellor <nathan@kernel.org>
      Reported-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Tested-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: default avatarSaravana Kannan <saravanak@google.com>
      Link: https://lore.kernel.org/r/20220526034609.480766-3-saravanak@google.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9be4cbd0
    • Saravana Kannan's avatar
      driver core: Fix wait_for_device_probe() & deferred_probe_timeout interaction · 5ee76c25
      Saravana Kannan authored
      Mounting NFS rootfs was timing out when deferred_probe_timeout was
      non-zero [1].  This was because ip_auto_config() initcall times out
      waiting for the network interfaces to show up when
      deferred_probe_timeout was non-zero. While ip_auto_config() calls
      wait_for_device_probe() to make sure any currently running deferred
      probe work or asynchronous probe finishes, that wasn't sufficient to
      account for devices being deferred until deferred_probe_timeout.
      
      Commit 35a67236 ("driver core: Ensure wait_for_device_probe() waits
      until the deferred_probe_timeout fires") tried to fix that by making
      sure wait_for_device_probe() waits for deferred_probe_timeout to expire
      before returning.
      
      However, if wait_for_device_probe() is called from the kernel_init()
      context:
      
      - Before deferred_probe_initcall() [2], it causes the boot process to
        hang due to a deadlock.
      
      - After deferred_probe_initcall() [3], it blocks kernel_init() from
        continuing till deferred_probe_timeout expires and beats the point of
        deferred_probe_timeout that's trying to wait for userspace to load
        modules.
      
      Neither of this is good. So revert the changes to
      wait_for_device_probe().
      
      [1] - https://lore.kernel.org/lkml/TYAPR01MB45443DF63B9EF29054F7C41FD8C60@TYAPR01MB4544.jpnprd01.prod.outlook.com/
      [2] - https://lore.kernel.org/lkml/YowHNo4sBjr9ijZr@dev-arch.thelio-3990X/
      [3] - https://lore.kernel.org/lkml/Yo3WvGnNk3LvLb7R@linutronix.de/
      
      Fixes: 35a67236 ("driver core: Ensure wait_for_device_probe() waits until the deferred_probe_timeout fires")
      Cc: John Stultz <jstultz@google.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
      Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
      Cc: Robin Murphy <robin.murphy@arm.com>
      Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
      Cc: Sudeep Holla <sudeep.holla@arm.com>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Naresh Kamboju <naresh.kamboju@linaro.org>
      Cc: Basil Eljuse <Basil.Eljuse@arm.com>
      Cc: Ferry Toth <fntoth@gmail.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Anders Roxell <anders.roxell@linaro.org>
      Cc: linux-pm@vger.kernel.org
      Reported-by: default avatarNathan Chancellor <nathan@kernel.org>
      Reported-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Tested-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Acked-by: default avatarJohn Stultz <jstultz@google.com>
      Signed-off-by: default avatarSaravana Kannan <saravanak@google.com>
      Link: https://lore.kernel.org/r/20220526034609.480766-2-saravanak@google.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Reviewed-by: default avatarRafael J. Wysocki <rafael@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5ee76c25
    • Arnd Bergmann's avatar
      ARM: omap1: enable multiplatform · 7036440e
      Arnd Bergmann authored
      With all the header files out of the way, and the clock driver
      converted to the common framework, nothing stops us from building
      OMAP together with the other platforms.
      
      As usual, the decompressor support is a victim here, and is
      only available when CONFIG_DEBUG_LL is configured for the
      particular board.
      Acked-by: default avatarTony Lindgren <tony@atomide.com>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      7036440e
    • Janusz Krzysztofik's avatar
      ARM: OMAP1: clock: Convert to CCF · c73b9099
      Janusz Krzysztofik authored
      OMAP1 still uses its own implementation of standard clock API defined in
      include/linux/clk.h.  Internals of that implementation are not visible
      outside OMAP1 directory.  As a consequence, device drivers are not able to
      register clocks potentially provided by peripheral devices.
      
      Drop OMAP1 implementation of the clock API and enable common clock
      framework.  Modify the remaining low level code to be compatible with
      clock provider API and register the clocks with CCF.
      
      Move initialisation of clocks to omap1_timer_init() to avoid memory
      allocation issues at early setup phase from where omap1_init_early() is
      called.  Register the clocks after initialization of clock I/O registers,
      local clock pointers used by OMAP1 clock ops, and local .rate fields of
      clocks with no local implementation of .recalc ops, so CCF structures are
      populated with correct data during clock registration.  Instead of
      enabling some of the registered clocks, flag them for CCF as critical.
      Introduce .is_enabled op using code that verifies hardware status of clock
      enablement, split out from implementation of .disable_unused op, so the
      latter is actually called by CCF for not requested but hardware enabled
      clocks.  Add .round_rate ops where missing so .set_rate ops are called by
      CCF as expected.  Since CCF allows parallel execution of .enable/.disable
      and .set_rate ops, protect registers shared among those groups of ops from
      concurrent access with spinlocks.  Drop local debugfs support in favor of
      that provided by CCF.
      
      v2: flag tc2_ck as CLK_IS_CRITICAL (Aaro)
      v3: rebase on top of soc/omap1-multiplatform-5.18,
        - drop no longer needed includes from arch/arm/mach-omap1/io.c
      Signed-off-by: default avatarJanusz Krzysztofik <jmkrzyszt@gmail.com>
      Acked-by: default avatarTony Lindgren <tony@atomide.com>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      c73b9099
    • Linus Torvalds's avatar
      Merge tag 'driver-core-5.19-rc1' of... · 500a434f
      Linus Torvalds authored
      Merge tag 'driver-core-5.19-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 changes for 5.19-rc1.
      
        Lots of tiny driver core changes and cleanups happened this cycle, but
        the two major things are:
      
         - firmware_loader reorganization and additions including the ability
           to have XZ compressed firmware images and the ability for userspace
           to initiate the firmware load when it needs to, instead of being
           always initiated by the kernel. FPGA devices specifically want this
           ability to have their firmware changed over the lifetime of the
           system boot, and this allows them to work without having to come up
           with yet-another-custom-uapi interface for loading firmware for
           them.
      
         - physical location support added to sysfs so that devices that know
           this information, can tell userspace where they are located in a
           common way. Some ACPI devices already support this today, and more
           bus types should support this in the future.
      
        Smaller changes include:
      
         - driver_override api cleanups and fixes
      
         - error path cleanups and fixes
      
         - get_abi script fixes
      
         - deferred probe timeout changes.
      
        It's that last change that I'm the most worried about. It has been
        reported to cause boot problems for a number of systems, and I have a
        tested patch series that resolves this issue. But I didn't get it
        merged into my tree before 5.18-final came out, so it has not gotten
        any linux-next testing.
      
        I'll send the fixup patches (there are 2) as a follow-on series to this
        pull request.
      
        All have been tested in linux-next for weeks, with no reported issues
        other than the above-mentioned boot time-outs"
      
      * tag 'driver-core-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (55 commits)
        driver core: fix deadlock in __device_attach
        kernfs: Separate kernfs_pr_cont_buf and rename_lock.
        topology: Remove unused cpu_cluster_mask()
        driver core: Extend deferred probe timeout on driver registration
        MAINTAINERS: add Russ Weight as a firmware loader maintainer
        driver: base: fix UAF when driver_attach failed
        test_firmware: fix end of loop test in upload_read_show()
        driver core: location: Add "back" as a possible output for panel
        driver core: location: Free struct acpi_pld_info *pld
        driver core: Add "*" wildcard support to driver_async_probe cmdline param
        driver core: location: Check for allocations failure
        arch_topology: Trace the update thermal pressure
        kernfs: Rename kernfs_put_open_node to kernfs_unlink_open_file.
        export: fix string handling of namespace in EXPORT_SYMBOL_NS
        rpmsg: use local 'dev' variable
        rpmsg: Fix calling device_lock() on non-initialized device
        firmware_loader: describe 'module' parameter of firmware_upload_register()
        firmware_loader: Move definitions from sysfs_upload.h to sysfs.h
        firmware_loader: Fix configs for sysfs split
        selftests: firmware: Add firmware upload selftests
        ...
      500a434f
    • Linus Torvalds's avatar
      Merge tag 'char-misc-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 6f9b5ed8
      Linus Torvalds authored
      Pull char / misc / other smaller driver subsystem updates from Greg KH:
       "Here is the large set of char, misc, and other driver subsystem
        updates for 5.19-rc1. The merge request for this has been delayed as I
        wanted to get lots of linux-next testing due to some late arrivals of
        changes for the habannalabs driver.
      
        Highlights of this merge are:
      
         - habanalabs driver updates for new hardware types and fixes and
           other updates
      
         - IIO driver tree merge which includes loads of new IIO drivers and
           cleanups and additions
      
         - PHY driver tree merge with new drivers and small updates to
           existing ones
      
         - interconnect driver tree merge with fixes and updates
      
         - soundwire driver tree merge with some small fixes
      
         - coresight driver tree merge with small fixes and updates
      
         - mhi bus driver tree merge with lots of updates and new device
           support
      
         - firmware driver updates
      
         - fpga driver updates
      
         - lkdtm driver updates (with a merge conflict, more on that below)
      
         - extcon driver tree merge with small updates
      
         - lots of other tiny driver updates and fixes and cleanups, full
           details in the shortlog.
      
        All of these have been in linux-next for almost 2 weeks with no
        reported problems"
      
      * tag 'char-misc-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (387 commits)
        habanalabs: use separate structure info for each error collect data
        habanalabs: fix missing handle shift during mmap
        habanalabs: remove hdev from hl_ctx_get args
        habanalabs: do MMU prefetch as deferred work
        habanalabs: order memory manager messages
        habanalabs: return -EFAULT on copy_to_user error
        habanalabs: use NULL for eventfd
        habanalabs: update firmware header
        habanalabs: add support for notification via eventfd
        habanalabs: add topic to memory manager buffer
        habanalabs: handle race in driver fini
        habanalabs: add device memory scrub ability through debugfs
        habanalabs: use unified memory manager for CB flow
        habanalabs: unified memory manager new code for CB flow
        habanalabs/gaudi: set arbitration timeout to a high value
        habanalabs: add put by handle method to memory manager
        habanalabs: hide memory manager page shift
        habanalabs: Add separate poll interval value for protocol
        habanalabs: use get_task_pid() to take PID
        habanalabs: add prefetch flag to the MAP operation
        ...
      6f9b5ed8
    • Linus Torvalds's avatar
      Merge tag 'usb-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 54c2cc79
      Linus Torvalds authored
      Pull USB / Thunderbolt updates from Greg KH:
       "Here is the "big" set of USB and Thunderbolt driver changes for
        5.18-rc1. For the most part it's been a quiet development cycle for
        the USB core, but there are the usual "hot spots" of development
        activity.
      
        Included in here are:
      
         - Thunderbolt driver updates:
             - fixes for devices without displayport adapters
             - lane bonding support and improvements
             - other minor changes based on device testing
      
         - dwc3 gadget driver changes.
      
           It seems this driver will never be finished given that the IP core
           is showing up in zillions of new devices and each implementation
           decides to do something different with it...
      
         - uvc gadget driver updates as more devices start to use and rely on
           this hardware as well
      
         - usb_maxpacket() api changes to remove an unneeded and unused
           parameter.
      
         - usb-serial driver device id updates and small cleanups
      
         - typec cleanups and fixes based on device testing
      
         - device tree updates for usb properties
      
         - lots of other small fixes and driver updates.
      
        All of these have been in linux-next for weeks with no reported
        problems"
      
      * tag 'usb-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (154 commits)
        USB: new quirk for Dell Gen 2 devices
        usb: dwc3: core: Add error log when core soft reset failed
        usb: dwc3: gadget: Move null pinter check to proper place
        usb: hub: Simplify error and success path in port_over_current_notify
        usb: cdns3: allocate TX FIFO size according to composite EP number
        usb: dwc3: Fix ep0 handling when getting reset while doing control transfer
        usb: Probe EHCI, OHCI controllers asynchronously
        usb: isp1760: Fix out-of-bounds array access
        xhci: Don't defer primary roothub registration if there is only one roothub
        USB: serial: option: add Quectel BG95 modem
        USB: serial: pl2303: fix type detection for odd device
        xhci: Allow host runtime PM as default for Intel Alder Lake N xHCI
        xhci: Remove quirk for over 10 year old evaluation hardware
        xhci: prevent U2 link power state if Intel tier policy prevented U1
        xhci: use generic command timer for stop endpoint commands.
        usb: host: xhci-plat: omit shared hcd if either root hub has no ports
        usb: host: xhci-plat: prepare operation w/o shared hcd
        usb: host: xhci-plat: create shared hcd after having added main hcd
        xhci: prepare for operation w/o shared hcd
        xhci: factor out parts of xhci_gen_setup()
        ...
      54c2cc79
    • Linus Torvalds's avatar
      Merge tag 'tty-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 932c2989
      Linus Torvalds authored
      Pull tty and serial driver updates from Greg KH:
       "Here is the big set of tty and serial driver updates for 5.19-rc1.
      
        Lots of tiny cleanups in here, the major stuff is:
      
         - termbit cleanups and unification by Ilpo. A much needed change that
           goes a long way to making things simpler for all of the different
           arches
      
         - tty documentation cleanups and movements to their own place in the
           documentation tree
      
         - old tty driver cleanups and fixes from Jiri to bring some existing
           drivers into the modern world
      
         - RS485 cleanups and unifications to make it easier for individual
           drivers to support this mode instead of having to duplicate logic
           in each driver
      
         - Lots of 8250 driver updates and additions
      
         - new device id additions
      
         - n_gsm continued fixes and cleanups
      
         - other minor serial driver updates and cleanups
      
        All of these have been in linux-next for weeks with no reported issues"
      
      * tag 'tty-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (166 commits)
        tty: Rework receive flow control char logic
        pcmcia: synclink_cs: Don't allow CS5-6
        serial: stm32-usart: Correct CSIZE, bits, and parity
        serial: st-asc: Sanitize CSIZE and correct PARENB for CS7
        serial: sifive: Sanitize CSIZE and c_iflag
        serial: sh-sci: Don't allow CS5-6
        serial: txx9: Don't allow CS5-6
        serial: rda-uart: Don't allow CS5-6
        serial: digicolor-usart: Don't allow CS5-6
        serial: uartlite: Fix BRKINT clearing
        serial: cpm_uart: Fix build error without CONFIG_SERIAL_CPM_CONSOLE
        serial: core: Do stop_rx in suspend path for console if console_suspend is disabled
        tty: serial: qcom-geni-serial: Remove uart frequency table. Instead, find suitable frequency with call to clk_round_rate.
        dt-bindings: serial: renesas,em-uart: Add RZ/V2M clock to access the registers
        serial: 8250_fintek: Check SER_RS485_RTS_* only with RS485
        Revert "serial: 8250_mtk: Make sure to select the right FEATURE_SEL"
        serial: msm_serial: disable interrupts in __msm_console_write()
        serial: meson: acquire port->lock in startup()
        serial: 8250_dw: Use dev_err_probe()
        serial: 8250_dw: Use devm_add_action_or_reset()
        ...
      932c2989
    • Linus Torvalds's avatar
      Merge tag 'staging-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 4ad680f0
      Linus Torvalds authored
      Pull staging driver updates from Greg KH:
       "Here is the big set of staging driver updates for 5.19-rc1.
      
        Lots of forward progress happened this development cycle, one driver
        (wfx wireless driver) got merged into the real portion of the kernel,
        and another one (unisys) was removed as no one is around anymore to
        take care of it and no one has the hardware. Combined with loads of
        tiny driver cleanups overall we removed 13k lines of code from the
        tree, a nice improvement.
      
        Other than the wfx and unisys driver changes the major points of this
        merge is:
      
         - r8188eu driver cleanups. So many cleanups. It's amazing just how
           many things have been cleaned up here, and yet, how many remain to
           go. Lots of work happened here, and it doesn't look to slow down
           any time soon.
      
         - other wifi driver cleanups. Not as many as the r8188eu driver, but
           still pretty impressive from a janitorial point of view.
      
         - bcm2853 driver cleanups
      
         - other very minor driver cleanups
      
        All of these have been in the linux-next tree for weeks with no
        reported issues"
      
      * tag 'staging-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (363 commits)
        staging: r8188eu: remove include/rtw_debug.h
        staging: r8188eu: prevent ->Ssid overflow in rtw_wx_set_scan()
        staging: r8188eu: delete rtw_wx_read/write32()
        staging: r8188eu: Remove multiple assignments
        staging: r8188eu: add check for kzalloc
        staging: r8188eu: fix warnings in rtw_wlan_util
        staging: r8188eu: fix warnings in rtw_pwrctrl
        staging: r8188eu: fix warnings in rtw_p2p
        staging: rtl8712: fix uninit-value in r871xu_drv_init()
        staging: rtl8712: fix uninit-value in usb_read8() and friends
        staging: rtl8712: add error handler in r8712_usbctrl_vendorreq()
        staging: r8188eu: remove _drv_ defines from include/rtw_debug.h
        staging: vc04_services: remove unused macro
        staging: rtl8192u: remove null check after call container_of()
        staging: rtl8192e: remove null check after call container_of()
        staging: ks7010: remove null check after call container_of()
        staging: r8188eu: remove HW_VAR_AC_PARAM_BE from SetHwReg8188EU()
        staging: r8188eu: assoc_rsp and assoc_rsp_len are not used
        staging: r8188eu: last_rx_mgnt_pkts is set but not used
        staging: r8188eu: simplify error handling in recv_func_prehandle
        ...
      4ad680f0
    • Linus Torvalds's avatar
      Merge tag 'spdx-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx · 04d93b2b
      Linus Torvalds authored
      Pull SPDX updates from Greg KH:
       "Here are some SPDX license marker changes.
      
        The SPDX-labeling effort has started to pick up again, so here are
        some changes for various parts of the tree that are related to this
        effort.
      
        Included in here are:
      
         - freevxfs license updates
      
         - spihash.c license cleanups
      
         - spdxcheck script updates to make things easier to work with going
           forward
      
        All of the license updates came from the original authors/copyright
        holders of the code involved.
      
        All of these have been in linux-next for weeks with no reported
        issues"
      
      * tag 'spdx-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx:
        siphash: add SPDX tags as sole licensing authority
        scripts/spdxcheck: Exclude top-level README
        scripts/spdxcheck: Exclude MAINTAINERS/CREDITS
        scripts/spdxcheck: Exclude config directories
        scripts/spdxcheck: Put excluded files and directories into a separate file
        scripts/spdxcheck: Add option to display files without SPDX
        scripts/spdxcheck: Add [sub]directory statistics
        scripts/spdxcheck: Add directory statistics
        scripts/spdxcheck: Add percentage to statistics
        freevxfs: relicense to GPLv2 only
      04d93b2b
    • Linus Torvalds's avatar
      Merge tag 'for-5.19/drivers-2022-06-02' of git://git.kernel.dk/linux-block · 78c6499c
      Linus Torvalds authored
      Pull more block driver updates from Jens Axboe:
       "A collection of stragglers that were late on sending in their changes
        and just followup fixes.
      
         - NVMe fixes pull request via Christoph:
             - set controller enable bit in a separate write (Niklas Cassel)
             - disable namespace identifiers for the MAXIO MAP1001 (Christoph)
             - fix a comment typo (Julia Lawall)"
      
         - MD fixes pull request via Song:
             - Remove uses of bdevname (Christoph Hellwig)
             - Bug fixes (Guoqing Jiang, and Xiao Ni)
      
         - bcache fixes series (Coly)
      
         - null_blk zoned write fix (Damien)
      
         - nbd fixes (Yu, Zhang)
      
         - Fix for loop partition scanning (Christoph)"
      
      * tag 'for-5.19/drivers-2022-06-02' of git://git.kernel.dk/linux-block: (23 commits)
        block: null_blk: Fix null_zone_write()
        nvmet: fix typo in comment
        nvme: set controller enable bit in a separate write
        nvme-pci: disable namespace identifiers for the MAXIO MAP1001
        bcache: avoid unnecessary soft lockup in kworker update_writeback_rate()
        nbd: use pr_err to output error message
        nbd: fix possible overflow on 'first_minor' in nbd_dev_add()
        nbd: fix io hung while disconnecting device
        nbd: don't clear 'NBD_CMD_INFLIGHT' flag if request is not completed
        nbd: fix race between nbd_alloc_config() and module removal
        nbd: call genl_unregister_family() first in nbd_cleanup()
        md: bcache: check the return value of kzalloc() in detached_dev_do_request()
        bcache: memset on stack variables in bch_btree_check() and bch_sectors_dirty_init()
        block, loop: support partitions without scanning
        bcache: avoid journal no-space deadlock by reserving 1 journal bucket
        bcache: remove incremental dirty sector counting for bch_sectors_dirty_init()
        bcache: improve multithreaded bch_sectors_dirty_init()
        bcache: improve multithreaded bch_btree_check()
        md: fix double free of io_acct_set bioset
        md: Don't set mddev private to NULL in raid0 pers->free
        ...
      78c6499c
    • Linus Torvalds's avatar
      Merge tag 'for-5.19/block-exec-2022-06-02' of git://git.kernel.dk/linux-block · 72fbbc3d
      Linus Torvalds authored
      Pull block request execute cleanups from Jens Axboe:
       "This change was advertised in the initial core block pull request, but
        didn't actually make that branch as we deferred it to a post-merge
        pull request to avoid a bunch of cross branch issues.
      
        This series cleans up the block execute path quite nicely"
      
      * tag 'for-5.19/block-exec-2022-06-02' of git://git.kernel.dk/linux-block:
        blk-mq: remove the done argument to blk_execute_rq_nowait
        blk-mq: avoid a mess of casts for blk_end_sync_rq
        blk-mq: remove __blk_execute_rq_nowait
      72fbbc3d
    • Linus Torvalds's avatar
      Merge tag 'for-5.19/block-2022-06-02' of git://git.kernel.dk/linux-block · 34845d92
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "Just a collection of fixes that have been queued up since the initial
        merge window pull request, the majority of which are targeted for
        stable as well.
      
        One bio_set fix that fixes an issue with the dm adoption of cached bio
        structs that got introduced in this merge window"
      
      * tag 'for-5.19/block-2022-06-02' of git://git.kernel.dk/linux-block:
        block: Fix potential deadlock in blk_ia_range_sysfs_show()
        block: fix bio_clone_blkg_association() to associate with proper blkcg_gq
        block: remove useless BUG_ON() in blk_mq_put_tag()
        blk-mq: do not update io_ticks with passthrough requests
        block: make bioset_exit() fully resilient against being called twice
        block: use bio_queue_enter instead of blk_queue_enter in bio_poll
        block: document BLK_STS_AGAIN usage
        block: take destination bvec offsets into account in bio_copy_data_iter
        blk-iolatency: Fix inflight count imbalances and IO hangs on offline
        blk-mq: don't touch ->tagset in blk_mq_get_sq_hctx
      34845d92
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.19-2022-06-02' of git://git.kernel.dk/linux-block · 5ac8bdb9
      Linus Torvalds authored
      Pull more io_uring updates from Jens Axboe:
      
       - A small series with some prep patches for the upcoming 5.20 split of
         the io_uring.c file. No functional changes here, just minor bits that
         are nice to get out of the way now (me)
      
       - Fix for a memory leak in high numbered provided buffer groups,
         introduced in the merge window (me)
      
       - Wire up the new socket opcode for allocated direct descriptors,
         making it consistent with the other opcodes that can instantiate a
         descriptor (me)
      
       - Fix for the inflight tracking, should go into 5.18-stable as well
         (me)
      
       - Fix for a deadlock for io-wq offloaded file slot allocations (Pavel)
      
       - Direct descriptor failure fput leak fix (Xiaoguang)
      
       - Fix for the direct descriptor allocation hinting in case of
         unsuccessful install (Xiaoguang)
      
      * tag 'io_uring-5.19-2022-06-02' of git://git.kernel.dk/linux-block:
        io_uring: reinstate the inflight tracking
        io_uring: fix deadlock on iowq file slot alloc
        io_uring: let IORING_OP_FILES_UPDATE support choosing fixed file slots
        io_uring: defer alloc_hint update to io_file_bitmap_set()
        io_uring: ensure fput() called correspondingly when direct install fails
        io_uring: wire up allocated direct descriptors for socket
        io_uring: fix a memory leak of buffer group list on exit
        io_uring: move shutdown under the general net section
        io_uring: unify calling convention for async prep handling
        io_uring: add io_op_defs 'def' pointer in req init and issue
        io_uring: make prep and issue side of req handlers named consistently
        io_uring: make timeout prep handlers consistent with other prep handlers
      5ac8bdb9
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · 6e5f6a86
      Linus Torvalds authored
      Pull virtio updates from Michael Tsirkin:
       "vhost,virtio and vdpa features, fixes, and cleanups:
      
         - mac vlan filter and stats support in mlx5 vdpa
      
         - irq hardening in virtio
      
         - performance improvements in virtio crypto
      
         - polling i/o support in virtio blk
      
         - ASID support in vhost
      
         - fixes, cleanups all over the place"
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (64 commits)
        vdpa: ifcvf: set pci driver data in probe
        vdpa/mlx5: Add RX MAC VLAN filter support
        vdpa/mlx5: Remove flow counter from steering
        vhost: rename vhost_work_dev_flush
        vhost-test: drop flush after vhost_dev_cleanup
        vhost-scsi: drop flush after vhost_dev_cleanup
        vhost_vsock: simplify vhost_vsock_flush()
        vhost_test: remove vhost_test_flush_vq()
        vhost_net: get rid of vhost_net_flush_vq() and extra flush calls
        vhost: flush dev once during vhost_dev_stop
        vhost: get rid of vhost_poll_flush() wrapper
        vhost-vdpa: return -EFAULT on copy_to_user() failure
        vdpasim: Off by one in vdpasim_set_group_asid()
        virtio: Directly use ida_alloc()/free()
        virtio: use WARN_ON() to warning illegal status value
        virtio: harden vring IRQ
        virtio: allow to unbreak virtqueue
        virtio-ccw: implement synchronize_cbs()
        virtio-mmio: implement synchronize_cbs()
        virtio-pci: implement synchronize_cbs()
        ...
      6e5f6a86
    • Linus Torvalds's avatar
      Merge tag 'sound-fix-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 6f6ebb98
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "A collection of small fixes for 5.19 merge window. Nothing particular
        stands out, as most changes are device-specific fixes and quirks"
      
      * tag 'sound-fix-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        selftests: alsa: Handle pkg-config failure more gracefully
        ALSA: usb-audio: Optimize TEAC clock quirk
        ASoC: da7219: cancel AAD related work earlier for jack removal
        ASoC: da7219: Fix pole orientation detection on certain headsets
        ASoC: Intel: avs: Fix build error on arc, m68k and sparc
        ALSA: hda/realtek - Fix microphone noise on ASUS TUF B550M-PLUS
        ALSA: hda/via: Delete does not require return
        ALSA: hda/realtek: Enable 4-speaker output for Dell XPS 15 9520 laptop
        ASoC: Intel: common: fix typo for tplg naming
        ALSA: usb-audio: Cancel pending work at closing a MIDI substream
        ALSA: usb-audio: Add mixer mapping for Gigabyte B450/550 Mobos
        ASoC: rt5640: Do not manipulate pin "Platform Clock" if the "Platform Clock" is not in the DAPM
        ASoC: SOF: amd: Fixed Build error
        ASoC: fsl_sai: Fix FSL_SAI_xDR/xFR definition
        ASoC: soc-pcm: fix BE transition for TRIGGER_START
      6f6ebb98
    • Rob Herring's avatar
      dt-bindings: mtd: spi-nand: Add spi-peripheral-props.yaml reference · 987cf300
      Rob Herring authored
      SPI peripheral device bindings need to reference spi-peripheral-props.yaml
      in order to use various SPI controller specific properties. Otherwise,
      the unevaluatedProperties check will reject any controller specific
      properties.
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Reviewed-by: default avatarPratyush Yadav <p.yadav@ti.com>
      Link: https://lore.kernel.org/r/20220525205909.2486153-1-robh@kernel.org
      987cf300
    • Linus Torvalds's avatar
      Merge tag 'drm-next-2022-06-03-1' of git://anongit.freedesktop.org/drm/drm · ab18b7b3
      Linus Torvalds authored
      Pull more drm updates from Dave Airlie:
       "This is mostly regular fixes, msm and amdgpu. There is a tegra patch
        that is bit of prep work for a 5.20 feature to avoid some inter-tree
        syncs, and a couple of late addition amdgpu uAPI changes but best to
        get those in early, and the userspace pieces are ready.
      
        msm:
         - Limiting WB modes to max sspp linewidth
         - Fixing the supported rotations to add 180 back for IGT
         - Fix to handle pm_runtime_get_sync() errors to avoid unclocked
           access in the bind() path for dpu driver
         - Fix the irq_free() without request issue which was a big-time
           hitter in the CI-runs.
      
        amdgpu:
         - Update fdinfo to the common drm format
         - uapi:
             - Add VM_NOALLOC GPUVM attribute to prevent buffers for going
               into the MALL
             - Add AMDGPU_GEM_CREATE_DISCARDABLE flag to create buffers that
               can be discarded on eviction
             - Mesa code which uses these:
                 https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16466
         - Link training fixes
         - DPIA fixes
         - Misc code cleanups
         - Aux fixes
         - Hotplug fixes
         - More FP clean up
         - Misc GFX9/10 fixes
         - Fix a possible memory leak in SMU shutdown
         - SMU 13 updates
         - RAS fixes
         - TMZ fixes
         - GC 11 updates
         - SMU 11 metrics fixes
         - Fix coverage blend mode for overlay plane
         - Note DDR vs LPDDR memory
         - Fuzz fix for CS IOCTL
         - Add new PCI DID
      
        amdkfd:
         - Clean up hive setup
         - Misc fixes
      
        tegra:
         - add some prelim 5.20 work to avoid inter-tree mess"
      
      * tag 'drm-next-2022-06-03-1' of git://anongit.freedesktop.org/drm/drm: (57 commits)
        drm/msm/dpu: Move min BW request and full BW disable back to mdss
        drm/msm/dpu: Fix pointer dereferenced before checking
        drm/msm/dpu: Remove unused code
        drm/msm/disp/dpu1: remove superfluous init
        drm/msm/dp: Always clear mask bits to disable interrupts at dp_ctrl_reset_irq_ctrl()
        gpu: host1x: Add context bus
        drm/amdgpu: add drm-client-id to fdinfo v2
        drm/amdgpu: Convert to common fdinfo format v5
        drm/amdgpu: bump minor version number
        drm/amdgpu: add AMDGPU_VM_NOALLOC v2
        drm/amdgpu: add AMDGPU_GEM_CREATE_DISCARDABLE
        drm/amdgpu: add beige goby PCI ID
        drm/amd/pm: Return auto perf level, if unsupported
        drm/amdkfd: fix typo in comment
        drm/amdgpu/gfx: fix typos in comments
        drm/amdgpu/cs: make commands with 0 chunks illegal behaviour.
        drm/amdgpu: differentiate between LP and non-LP DDR memory
        drm/amdgpu: Resolve pcie_bif RAS recovery bug
        drm/amdgpu: clean up asd on the ta_firmware_header_v2_0
        drm/amdgpu/discovery: validate VCN and SDMA instances
        ...
      ab18b7b3
    • Rob Herring's avatar
      dt-bindings: memory-controllers: ingenic: Split out child node properties · e1dff7f1
      Rob Herring authored
      Binding schemas which define child node properties such as memory
      controllers with timing properties need a separate schema which can be
      referenced from child device schemas. This is necessary for
      unevaluatedProperties checks to work properly.
      
      Move the ingenic,nemc child properties to its own file and reference
      from ingenic,nand.yaml which describes a child NAND controller.
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Acked-by: default avatarPaul Cercueil <paul@crapouillou.net>
      Link: https://lore.kernel.org/r/20220525210140.2489866-1-robh@kernel.org
      e1dff7f1
    • Rob Herring's avatar
      dt-bindings: net/dsa: Add spi-peripheral-props.yaml references · bbba69ef
      Rob Herring authored
      SPI peripheral device bindings need to reference spi-peripheral-props.yaml
      in order to use various SPI controller specific properties. Otherwise,
      the unevaluatedProperties check will reject any controller specific
      properties.
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Link: https://lore.kernel.org/r/20220531220122.2412711-1-robh@kernel.org
      bbba69ef
    • Huacai Chen's avatar
      MAINTAINERS: Add maintainer information for LoongArch · 8be44931
      Huacai Chen authored
      Add the maintainer information for the LoongArch (LA or LArch for short)
      architecture.
      Reviewed-by: default avatarGuo Ren <guoren@kernel.org>
      Reviewed-by: default avatarJiaxun Yang <jiaxun.yang@flygoat.com>
      Signed-off-by: default avatarWANG Xuerui <git@xen0n.name>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      8be44931
    • Huacai Chen's avatar
      LoongArch: Add Loongson-3 default config file · 9e8536e2
      Huacai Chen authored
      Add a default config file for LoongArch-based Loongson-3 platform.
      Reviewed-by: default avatarWANG Xuerui <git@xen0n.name>
      Reviewed-by: default avatarJiaxun Yang <jiaxun.yang@flygoat.com>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      9e8536e2
    • Huacai Chen's avatar
      LoongArch: Add Non-Uniform Memory Access (NUMA) support · d4b6f156
      Huacai Chen authored
      Add Non-Uniform Memory Access (NUMA) support for LoongArch. LoongArch
      has 48-bit physical address, but the HyperTransport I/O bus only support
      40-bit address, so we need a custom phys_to_dma() and dma_to_phys() to
      extract the 4-bit node id (bit 44~47) from Loongson-3's 48-bit physical
      address space and embed it into 40-bit. In the 40-bit dma address, node
      id offset can be read from the LS7A_DMA_CFG register.
      Reviewed-by: default avatarWANG Xuerui <git@xen0n.name>
      Reviewed-by: default avatarJiaxun Yang <jiaxun.yang@flygoat.com>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      d4b6f156
    • Huacai Chen's avatar
      LoongArch: Add multi-processor (SMP) support · 46859ac8
      Huacai Chen authored
      LoongArch-based procesors have 4, 8 or 16 cores per package. This patch
      adds multi-processor (SMP) support for LoongArch.
      Reviewed-by: default avatarWANG Xuerui <git@xen0n.name>
      Reviewed-by: default avatarJiaxun Yang <jiaxun.yang@flygoat.com>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      46859ac8
    • Huacai Chen's avatar
      LoongArch: Add VDSO and VSYSCALL support · c6b99bed
      Huacai Chen authored
      Add VDSO and VSYSCALL support (sigreturn, gettimeofday and its friends)
      for LoongArch.
      Reviewed-by: default avatarWANG Xuerui <git@xen0n.name>
      Reviewed-by: default avatarJiaxun Yang <jiaxun.yang@flygoat.com>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      c6b99bed
    • Huacai Chen's avatar
      LoongArch: Add some library functions · 559671e0
      Huacai Chen authored
      Add some library functions for LoongArch, including: delay, memset,
      memcpy, memmove, copy_user, strncpy_user, strnlen_user and tlb dump
      functions.
      Reviewed-by: default avatarWANG Xuerui <git@xen0n.name>
      Reviewed-by: default avatarJiaxun Yang <jiaxun.yang@flygoat.com>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      559671e0
    • Huacai Chen's avatar
      LoongArch: Add misc common routines · 7153c3cb
      Huacai Chen authored
      Add some misc common routines for LoongArch, including: asm-offsets
      routines, futex functions, i/o memory access functions, frame-buffer
      functions, procfs information display, etc.
      Reviewed-by: default avatarWANG Xuerui <git@xen0n.name>
      Reviewed-by: default avatarJiaxun Yang <jiaxun.yang@flygoat.com>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      7153c3cb