1. 23 May, 2024 7 commits
    • Linus Torvalds's avatar
      Merge tag 'trace-assign-str-v6.10' of... · d6a326d6
      Linus Torvalds authored
      Merge tag 'trace-assign-str-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
      
      Pull tracing cleanup from Steven Rostedt:
       "Remove second argument of __assign_str()
      
        The __assign_str() macro logic of the TRACE_EVENT() macro was
        optimized so that it no longer needs the second argument. The
        __assign_str() is always matched with __string() field that takes a
        field name and the source for that field:
      
          __string(field, source)
      
        The TRACE_EVENT() macro logic will save off the source value and then
        use that value to copy into the ring buffer via the __assign_str().
      
        Before commit c1fa617c ("tracing: Rework __assign_str() and
        __string() to not duplicate getting the string"), the __assign_str()
        needed the second argument which would perform the same logic as the
        __string() source parameter did. Not only would this add overhead, but
        it was error prone as if the __assign_str() source produced something
        different, it may not have allocated enough for the string in the ring
        buffer (as the __string() source was used to determine how much to
        allocate)
      
        Now that the __assign_str() just uses the same string that was used in
        __string() it no longer needs the source parameter. It can now be
        removed"
      
      * tag 'trace-assign-str-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
        tracing/treewide: Remove second parameter of __assign_str()
      d6a326d6
    • Linus Torvalds's avatar
      Merge tag 'sparc-for-6.10-tag1' of... · bca2a25d
      Linus Torvalds authored
      Merge tag 'sparc-for-6.10-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/alarsson/linux-sparc
      
      Pull sparc updates from Andreas Larsson:
      
       - Avoid on-stack cpumask variables in a number of places
      
       - Move struct termio to asm/termios.h, matching other architectures and
         allowing certain user space applications to build also for sparc
      
       - Fix missing prototype warnings for sparc64
      
       - Fix version generation warnings for sparc32
      
       - Fix bug where non-consecutive CPU IDs lead to some CPUs not starting
      
       - Simplification using swap and cleanup using NULL for pointer
      
       - Convert sparc parport and chmc drivers to use remove callbacks
         returning void
      
      * tag 'sparc-for-6.10-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/alarsson/linux-sparc:
        sparc/leon: Remove on-stack cpumask var
        sparc/pci_msi: Remove on-stack cpumask var
        sparc/of: Remove on-stack cpumask var
        sparc/irq: Remove on-stack cpumask var
        sparc/srmmu: Remove on-stack cpumask var
        sparc: chmc: Convert to platform remove callback returning void
        sparc: parport: Convert to platform remove callback returning void
        sparc: Compare pointers to NULL instead of 0
        sparc: Use swap() to fix Coccinelle warning
        sparc32: Fix version generation failed warnings
        sparc64: Fix number of online CPUs
        sparc64: Fix prototype warning for sched_clock
        sparc64: Fix prototype warnings in adi_64.c
        sparc64: Fix prototype warning for dma_4v_iotsb_bind
        sparc64: Fix prototype warning for uprobe_trap
        sparc64: Fix prototype warning for alloc_irqstack_bootmem
        sparc64: Fix prototype warning for vmemmap_free
        sparc64: Fix prototype warnings in traps_64.c
        sparc64: Fix prototype warning for init_vdso_image
        sparc: move struct termio to asm/termios.h
      bca2a25d
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 2b7ced10
      Linus Torvalds authored
      Pull arm64 fixes from Will Deacon:
       "The major fix here is for a filesystem corruption issue reported on
        Apple M1 as a result of buggy management of the floating point
        register state introduced in 6.8. I initially reverted one of the
        offending patches, but in the end Ard cooked a proper fix so there's a
        revert+reapply in the series.
      
        Aside from that, we've got some CPU errata workarounds and misc other
        fixes.
      
         - Fix broken FP register state tracking which resulted in filesystem
           corruption when dm-crypt is used
      
         - Workarounds for Arm CPU errata affecting the SSBS Spectre
           mitigation
      
         - Fix lockdep assertion in DMC620 memory controller PMU driver
      
         - Fix alignment of BUG table when CONFIG_DEBUG_BUGVERBOSE is
           disabled"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64/fpsimd: Avoid erroneous elide of user state reload
        Reapply "arm64: fpsimd: Implement lazy restore for kernel mode FPSIMD"
        arm64: asm-bug: Add .align 2 to the end of __BUG_ENTRY
        perf/arm-dmc620: Fix lockdep assert in ->event_init()
        Revert "arm64: fpsimd: Implement lazy restore for kernel mode FPSIMD"
        arm64: errata: Add workaround for Arm errata 3194386 and 3312417
        arm64: cputype: Add Neoverse-V3 definitions
        arm64: cputype: Add Cortex-X4 definitions
        arm64: barrier: Restore spec_bar() macro
      2b7ced10
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · 2ef32ad2
      Linus Torvalds authored
      Pull virtio updates from Michael Tsirkin:
       "Several new features here:
      
         - virtio-net is finally supported in vduse
      
         - virtio (balloon and mem) interaction with suspend is improved
      
         - vhost-scsi now handles signals better/faster
      
        And fixes, cleanups all over the place"
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (48 commits)
        virtio-pci: Check if is_avq is NULL
        virtio: delete vq in vp_find_vqs_msix() when request_irq() fails
        MAINTAINERS: add Eugenio Pérez as reviewer
        vhost-vdpa: Remove usage of the deprecated ida_simple_xx() API
        vp_vdpa: don't allocate unused msix vectors
        sound: virtio: drop owner assignment
        fuse: virtio: drop owner assignment
        scsi: virtio: drop owner assignment
        rpmsg: virtio: drop owner assignment
        nvdimm: virtio_pmem: drop owner assignment
        wifi: mac80211_hwsim: drop owner assignment
        vsock/virtio: drop owner assignment
        net: 9p: virtio: drop owner assignment
        net: virtio: drop owner assignment
        net: caif: virtio: drop owner assignment
        misc: nsm: drop owner assignment
        iommu: virtio: drop owner assignment
        drm/virtio: drop owner assignment
        gpio: virtio: drop owner assignment
        firmware: arm_scmi: virtio: drop owner assignment
        ...
      2ef32ad2
    • Linus Torvalds's avatar
      Merge tag 'mm-nonmm-stable-2024-05-22-17-30' of... · c760b372
      Linus Torvalds authored
      Merge tag 'mm-nonmm-stable-2024-05-22-17-30' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
      
      Pull more non-mm updates from Andrew Morton:
      
       - A series ("kbuild: enable more warnings by default") from Arnd
         Bergmann which enables a number of additional build-time warnings. We
         fixed all the fallout which we could find, there may still be a few
         stragglers.
      
       - Samuel Holland has developed the series "Unified cross-architecture
         kernel-mode FPU API". This does a lot of consolidation of
         per-architecture kernel-mode FPU usage and enables the use of newer
         AMD GPUs on RISC-V.
      
       - Tao Su has fixed some selftests build warnings in the series
         "Selftests: Fix compilation warnings due to missing _GNU_SOURCE
         definition".
      
       - This pull also includes a nilfs2 fixup from Ryusuke Konishi.
      
      * tag 'mm-nonmm-stable-2024-05-22-17-30' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (23 commits)
        nilfs2: make block erasure safe in nilfs_finish_roll_forward()
        selftests/harness: use 1024 in place of LINE_MAX
        Revert "selftests/harness: remove use of LINE_MAX"
        selftests/fpu: allow building on other architectures
        selftests/fpu: move FP code to a separate translation unit
        drm/amd/display: use ARCH_HAS_KERNEL_FPU_SUPPORT
        drm/amd/display: only use hard-float, not altivec on powerpc
        riscv: add support for kernel-mode FPU
        x86: implement ARCH_HAS_KERNEL_FPU_SUPPORT
        powerpc: implement ARCH_HAS_KERNEL_FPU_SUPPORT
        LoongArch: implement ARCH_HAS_KERNEL_FPU_SUPPORT
        lib/raid6: use CC_FLAGS_FPU for NEON CFLAGS
        arm64: crypto: use CC_FLAGS_FPU for NEON CFLAGS
        arm64: implement ARCH_HAS_KERNEL_FPU_SUPPORT
        ARM: crypto: use CC_FLAGS_FPU for NEON CFLAGS
        ARM: implement ARCH_HAS_KERNEL_FPU_SUPPORT
        arch: add ARCH_HAS_KERNEL_FPU_SUPPORT
        x86/fpu: fix asm/fpu/types.h include guard
        kbuild: enable -Wcast-function-type-strict unconditionally
        kbuild: enable -Wformat-truncation on clang
        ...
      c760b372
    • Linus Torvalds's avatar
      Merge tag 'mm-stable-2024-05-22-17-22' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm · 5c6f4d68
      Linus Torvalds authored
      Pull more mm updates from Andrew Morton:
       "A series from Dave Chinner which cleans up and fixes the handling of
        nested allocations within stackdepot and page-owner"
      
      * tag 'mm-stable-2024-05-22-17-22' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
        mm/page-owner: use gfp_nested_mask() instead of open coded masking
        stackdepot: use gfp_nested_mask() instead of open coded masking
        mm: lift gfp_kmemleak_mask() to gfp.h
      5c6f4d68
    • Steven Rostedt (Google)'s avatar
      tracing/treewide: Remove second parameter of __assign_str() · 2c92ca84
      Steven Rostedt (Google) authored
      With the rework of how the __string() handles dynamic strings where it
      saves off the source string in field in the helper structure[1], the
      assignment of that value to the trace event field is stored in the helper
      value and does not need to be passed in again.
      
      This means that with:
      
        __string(field, mystring)
      
      Which use to be assigned with __assign_str(field, mystring), no longer
      needs the second parameter and it is unused. With this, __assign_str()
      will now only get a single parameter.
      
      There's over 700 users of __assign_str() and because coccinelle does not
      handle the TRACE_EVENT() macro I ended up using the following sed script:
      
        git grep -l __assign_str | while read a ; do
            sed -e 's/\(__assign_str([^,]*[^ ,]\) *,[^;]*/\1)/' $a > /tmp/test-file;
            mv /tmp/test-file $a;
        done
      
      I then searched for __assign_str() that did not end with ';' as those
      were multi line assignments that the sed script above would fail to catch.
      
      Note, the same updates will need to be done for:
      
        __assign_str_len()
        __assign_rel_str()
        __assign_rel_str_len()
      
      I tested this with both an allmodconfig and an allyesconfig (build only for both).
      
      [1] https://lore.kernel.org/linux-trace-kernel/20240222211442.634192653@goodmis.org/
      
      Link: https://lore.kernel.org/linux-trace-kernel/20240516133454.681ba6a0@rorschach.local.home
      
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Julia Lawall <Julia.Lawall@inria.fr>
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      Acked-by: default avatarJani Nikula <jani.nikula@intel.com>
      Acked-by: Christian König <christian.koenig@amd.com> for the amdgpu parts.
      Acked-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> #for
      Acked-by: Rafael J. Wysocki <rafael@kernel.org> # for thermal
      Acked-by: default avatarTakashi Iwai <tiwai@suse.de>
      Acked-by: Darrick J. Wong <djwong@kernel.org>	# xfs
      Tested-by: default avatarGuenter Roeck <linux@roeck-us.net>
      2c92ca84
  2. 22 May, 2024 33 commits
    • Linus Torvalds's avatar
      mm: simplify and improve print_vma_addr() output · de7e71ef
      Linus Torvalds authored
      Use '%pD' to print out the filename, and print out the actual offset
      within the file too, rather than just what the virtual address of the
      mapping is (which doesn't tell you anything about any mapping offsets).
      
      Also, use the exact vma_lookup() instead of find_vma() - the latter
      looks up any vma _after_ the address, which is of questionable value
      (yes, maybe you fell off the beginning, but you'd be more likely to fall
      off the end).
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      de7e71ef
    • Linus Torvalds's avatar
      Merge local branch 'x86-codegen' · f8a6e48c
      Linus Torvalds authored
      Merge trivial x86 code generation annoyances
      
       - Introduce helper macros for clang asm input problems
      
       - use said macros to improve trivially stupid code generation issues in
         bitops and array_index_mask_nospec
      
       - also improve codegen with 32-bit array index comparisons
      
      None of these really matter, but I look at code generation and profiles
      fairly regularly, and these misfeatures caused the generated code to
      look really odd and distract from the real issues.
      
      * branch 'x86-codegen' of local tree:
        x86: improve bitop code generation with clang
        x86: improve array_index_mask_nospec() code generation
        clang: work around asm input constraint problems
      f8a6e48c
    • Linus Torvalds's avatar
      x86: improve bitop code generation with clang · b9b60b31
      Linus Torvalds authored
      This uses the new ASM_INPUT_RM macro to avoid the bad code generation
      issue that clang has with more generic asm inputs.
      
      This ends up avoiding generating code like this:
      
       	mov    %r10,(%rsp)
       	tzcnt  (%rsp),%rcx
      
      which now becomes just
      
       	tzcnt  %r10,%rcx
      
      and in the process ends up also removing a few unnecessary stack frames
      when the only use was that pointless "asm uses memory location off stack".
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b9b60b31
    • Linus Torvalds's avatar
      x86: improve array_index_mask_nospec() code generation · 7453b948
      Linus Torvalds authored
      Don't force the inputs to be 'unsigned long', when the comparison can
      easily be done in 32-bit if that's more appropriate.
      
      Note that while we can look at the inputs to choose an appropriate size
      for the compare instruction, the output is fixed at 'unsigned long'.
      That's not technically optimal either, since a 32-bit 'sbbl' would often
      be sufficient.
      
      But for the outgoing mask we don't know how the mask ends up being used
      (ie we have uses that have an incoming 32-bit array index, but end up
      using the mask for other things).  That said, it only costs the extra
      REX prefix to always generate the 64-bit mask.
      
      [ A 'sbbl' also always technically generates a 64-bit mask, but with the
        upper 32 bits clear: that's fine for when the incoming index that will
        be masked is already 32-bit, but not if you use the mask to mask a
        pointer afterwards, like the file table lookup does ]
      
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7453b948
    • Linus Torvalds's avatar
      clang: work around asm input constraint problems · dbaaabd6
      Linus Torvalds authored
      Work around clang problems with asm constraints that have multiple
      possibilities, particularly "g" and "rm".
      
      Clang seems to turn inputs like that into the most generic form, which
      is the memory input - but to make matters worse, clang won't even use a
      possible original memory location, but will spill the value to stack,
      and use the stack for the asm input.
      
      See
      
        https://github.com/llvm/llvm-project/issues/20571#issuecomment-980933442
      
      for some explanation of why clang has this strange behavior, but the end
      result is that "g" and "rm" really end up generating horrid code.
      
      Link: https://github.com/llvm/llvm-project/issues/20571
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      dbaaabd6
    • Linus Torvalds's avatar
      Merge tag 'char-misc-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 5f16eb05
      Linus Torvalds authored
      Pull char/misc and other driver subsystem updates from Greg KH:
       "Here is the big set of char/misc and other driver subsystem updates
        for 6.10-rc1. Nothing major here, just lots of new drivers and updates
        for apis and new hardware types. Included in here are:
      
         - big IIO driver updates with more devices and drivers added
      
         - fpga driver updates
      
         - hyper-v driver updates
      
         - uio_pruss driver removal, no one uses it, other drivers control the
           same hardware now
      
         - binder minor updates
      
         - mhi driver updates
      
         - excon driver updates
      
         - counter driver updates
      
         - accessability driver updates
      
         - coresight driver updates
      
         - other hwtracing driver updates
      
         - nvmem driver updates
      
         - slimbus driver updates
      
         - spmi driver updates
      
         - other smaller misc and char driver updates
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'char-misc-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (319 commits)
        misc: ntsync: mark driver as "broken" to prevent from building
        spmi: pmic-arb: Add multi bus support
        spmi: pmic-arb: Register controller for bus instead of arbiter
        spmi: pmic-arb: Make core resources acquiring a version operation
        spmi: pmic-arb: Make the APID init a version operation
        spmi: pmic-arb: Fix some compile warnings about members not being described
        dt-bindings: spmi: Deprecate qcom,bus-id
        dt-bindings: spmi: Add X1E80100 SPMI PMIC ARB schema
        spmi: pmic-arb: Replace three IS_ERR() calls by null pointer checks in spmi_pmic_arb_probe()
        spmi: hisi-spmi-controller: Do not override device identifier
        dt-bindings: spmi: hisilicon,hisi-spmi-controller: clean up example
        dt-bindings: spmi: hisilicon,hisi-spmi-controller: fix binding references
        spmi: make spmi_bus_type const
        extcon: adc-jack: Document missing struct members
        extcon: realtek: Remove unused of_gpio.h
        extcon: usbc-cros-ec: Convert to platform remove callback returning void
        extcon: usb-gpio: Convert to platform remove callback returning void
        extcon: max77843: Convert to platform remove callback returning void
        extcon: max3355: Convert to platform remove callback returning void
        extcon: intel-mrfld: Convert to platform remove callback returning void
        ...
      5f16eb05
    • Linus Torvalds's avatar
      Merge tag 'driver-core-6.10-rc1' of... · d90be6e4
      Linus Torvalds authored
      Merge tag 'driver-core-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
      
      Pull driver core updates from Greg KH:
       "Here is the small set of driver core and kernfs changes for 6.10-rc1.
      
        Nothing major here at all, just a small set of changes for some driver
        core apis, and minor fixups. Included in here are:
      
         - sysfs_bin_attr_simple_read() helper added and used
      
         - device_show_string() helper added and used
      
        All usages of these were acked by the various maintainers. Also in
        here are:
      
         - kernfs minor cleanup
      
         - removed unused functions
      
         - typo fix in documentation
      
         - pay attention to sysfs_create_link() failures in module.c finally
      
        All of these have been in linux-next for a very long time with no
        reported problems"
      
      * tag 'driver-core-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        device property: Fix a typo in the description of device_get_child_node_count()
        kernfs: mount: Remove unnecessary ‘NULL’ values from knparent
        scsi: Use device_show_string() helper for sysfs attributes
        platform/x86: Use device_show_string() helper for sysfs attributes
        perf: Use device_show_string() helper for sysfs attributes
        IB/qib: Use device_show_string() helper for sysfs attributes
        hwmon: Use device_show_string() helper for sysfs attributes
        driver core: Add device_show_string() helper for sysfs attributes
        treewide: Use sysfs_bin_attr_simple_read() helper
        sysfs: Add sysfs_bin_attr_simple_read() helper
        module: don't ignore sysfs_create_link() failures
        driver core: Remove unused platform_notify, platform_notify_remove
      d90be6e4
    • Linus Torvalds's avatar
      Merge tag 'staging-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · be81389c
      Linus Torvalds authored
      Pull staging driver updates from Greg KH:
       "Here is the big set of staging driver changes for 6.10-rc1. Not a lot
        of cleanups happening this kernel release, intern applications must be
        out of sync at the moment. But we did delete two drivers, wlan-ng and
        pi433, as they are no longer in use and the developers involved wanted
        them just gone entirely, allowing us to drop 19k lines from the tree.
      
        Other than the normal coding style cleanups here, there has been a lot
        of work on the vc04_services code, with the intent to finally get that
        out of staging hopefully soon. It's getting closer, which is nice to
        see.
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'staging-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (98 commits)
        staging: pi433: Remove unused driver
        staging: vchiq_core: Add missing blank lines
        staging: vchiq_core: Drop unnecessary blank lines
        staging: vchiq_core: Add parentheses to VCHIQ_MSG_SRCPORT
        staging: vchiq_core: Use printk messages for devices
        staging: vchiq_arm: Drop unnecessary NULL check
        staging: vc04_services: Delete unnecessary NULL check
        staging: vc04_services: vchiq_arm: Fix NULL ptr dereferences
        Staging: rtl8192e: Rename variable DssCCk
        Staging: rtl8192e: Rename variable ExtHTCapInfo
        Staging: rtl8192e: Rename variable MPDUDensity
        Staging: rtl8192e: Rename variable MaxRxAMPDUFactor
        Staging: rtl8192e: Rename variable MaxAMSDUSize
        Staging: rtl8192e: Rename variable DelayBA
        Staging: rtl8192e: Rename variable RxSTBC
        Staging: rtl8192e: Rename variable TxSTBC
        Staging: rtl8192e: Rename variable GreenField
        Staging: rtl8192e: Rename variable ShortGI20Mhz
        Staging: rtl8192e: Rename variable ShortGI40Mhz
        Staging: rtl8192e: Rename variable MimoPwrSave
        ...
      be81389c
    • Linus Torvalds's avatar
      Merge tag 'tty-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · f6b8e86b
      Linus Torvalds authored
      Pull tty / serial updates from Greg KH:
       "Here is the big set of tty/serial driver changes for 6.10-rc1.
        Included in here are:
      
         - Usual good set of api cleanups and evolution by Jiri Slaby to make
           the serial interfaces move out of the 1990's by using kfifos
           instead of hand-rolling their own logic.
      
         - 8250_exar driver updates
      
         - max3100 driver updates
      
         - sc16is7xx driver updates
      
         - exar driver updates
      
         - sh-sci driver updates
      
         - tty ldisc api addition to help refuse bindings
      
         - other smaller serial driver updates
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'tty-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (113 commits)
        serial: Clear UPF_DEAD before calling tty_port_register_device_attr_serdev()
        serial: imx: Raise TX trigger level to 8
        serial: 8250_pnp: Simplify "line" related code
        serial: sh-sci: simplify locking when re-issuing RXDMA fails
        serial: sh-sci: let timeout timer only run when DMA is scheduled
        serial: sh-sci: describe locking requirements for invalidating RXDMA
        serial: sh-sci: protect invalidating RXDMA on shutdown
        tty: add the option to have a tty reject a new ldisc
        serial: core: Call device_set_awake_path() for console port
        dt-bindings: serial: brcm,bcm2835-aux-uart: convert to dtschema
        tty: serial: uartps: Add support for uartps controller reset
        arm64: zynqmp: Add resets property for UART nodes
        dt-bindings: serial: cdns,uart: Add optional reset property
        serial: 8250_pnp: Switch to DEFINE_SIMPLE_DEV_PM_OPS()
        serial: 8250_exar: Keep the includes sorted
        serial: 8250_exar: Make type of bit the same in exar_ee_*_bit()
        serial: 8250_exar: Use BIT() in exar_ee_read()
        serial: 8250_exar: Switch to use dev_err_probe()
        serial: 8250_exar: Return directly from switch-cases
        serial: 8250_exar: Decrease indentation level
        ...
      f6b8e86b
    • Linus Torvalds's avatar
      Merge tag 'usb-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 89601f67
      Linus Torvalds authored
      Pull USB / Thunderbolt updates from Greg KH:
       "Here is the big set of USB and Thunderbolt changes for 6.10-rc1.
        Nothing hugely earth-shattering, just constant forward progress for
        hardware support of new devices and cleanups over the drivers.
      
        Included in here are:
      
         - Thunderbolt / USB 4 driver updates
      
         - typec driver updates
      
         - dwc3 driver updates
      
         - gadget driver updates
      
         - uss720 driver id additions and fixes (people use USB->arallel port
           devices still!)
      
         - onboard-hub driver rename and additions for new hardware
      
         - xhci driver updates
      
         - other small USB driver updates and additions for quirks and api
           changes
      
        All of these have been in linux-next for a while with no reported
        problems"
      
      * tag 'usb-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (154 commits)
        drm/bridge: aux-hpd-bridge: correct devm_drm_dp_hpd_bridge_add() stub
        usb: fotg210: Add missing kernel doc description
        usb: dwc3: core: Fix unused variable warning in core driver
        usb: typec: tipd: rely on i2c_get_match_data()
        usb: typec: tipd: fix event checking for tps6598x
        usb: typec: tipd: fix event checking for tps25750
        dt-bindings: usb: qcom,dwc3: fix interrupt max items
        usb: fotg210: Use *-y instead of *-objs in Makefile
        usb: phy: tegra: Replace of_gpio.h by proper one
        usb: typec: ucsi: displayport: Fix potential deadlock
        usb: typec: qcom-pmic-typec: split HPD bridge alloc and registration
        usb: musc: Remove unused list 'buffers'
        usb: dwc3: Wait unconditionally after issuing EndXfer command
        usb: gadget: u_audio: Clear uac pointer when freed.
        usb: gadget: u_audio: Fix race condition use of controls after free during gadget unbind.
        dt-bindings: usb: dwc3: Add QDU1000 compatible
        usb: core: Remove the useless struct usb_devmap which is just a bitmap
        MAINTAINERS: Remove {ehci,uhci}-platform.c from ARM/VT8500 entry
        USB: usb_parse_endpoint: ignore reserved bits
        usb: xhci: compact 'trb_in_td()' arguments
        ...
      89601f67
    • Linus Torvalds's avatar
      Merge tag 'leds-next-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds · f3033eb7
      Linus Torvalds authored
      Pull LED updates from Lee Jones:
       "Core Frameworks:
         - Ensure seldom updated triggers have a brightness value before first
           update
      
        New Device Support:
         - Add support for Simatic IPC Device BX_59A to IPC LEDs Core
         - Add support for Qualcomm PMI8950 PWM to LPG Core
      
        New Functionality:
         - Add a bunch of new LED function identifiers
         - Add support for High Resolution Timers in LED Trigger Patten
      
        Fix-ups:
         - Shift out Audio Trigger to the Sound subsystem
         - Convert suitable calls to devm_* managed resources
         - Device Tree binding adaptions/conversions/creation
         - Remove superfluous code/variables/attributes and simplify overall
         - Use/convert to new/better APIs/helpers/MACROs instead of
           hand-rolling implementations
      
        Bug Fixes:
         - Repair enabling Torch Mode from V4L2 on the second LED
         - Ensure PWM is disabled when suspending"
      
      * tag 'leds-next-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: (28 commits)
        leds: mt6370: Remove unused field 'reg_cfgs' from 'struct mt6370_priv'
        leds: lp50xx: Remove unused field 'num_of_banked_leds' from 'struct lp50xx'
        leds: lp50xx: Remove unused field 'bank_modules' from 'struct lp50xx_led'
        leds: aat1290: Remove unused field 'torch_brightness' from 'struct aat1290_led'
        leds: sun50i-a100: Use match_string() helper to simplify the code
        leds: pwm: Disable PWM when going to suspend
        leds: trigger: pattern: Add support for hrtimer
        leds: mt6360: Fix the second LED can not enable torch mode by V4L2
        dt-bindings: leds: leds-qcom-lpg: Add support for PMI8950 PWM
        leds: qcom-lpg: Add support for PMI8950 PWM
        leds: apu: Remove duplicate DMI lookup data
        leds: trigger: netdev: Remove not needed call to led_set_brightness in deactivate
        dt-bindings: leds: Add LED_FUNCTION_SPEED_* for link speed on LAN/WAN
        dt-bindings: leds: Add LED_FUNCTION_MOBILE for mobile network
        leds: simatic-ipc-leds-gpio: Add support for module BX-59A
        dt-bindings: leds: qcom-lpg: Document PM6150L compatible
        dt-bindings: leds: pca963x: Convert text bindings to YAML
        leds: an30259a: Use devm_mutex_init() for mutex initialization
        leds: mlxreg: Use devm_mutex_init() for mutex initialization
        leds: nic78bx: Use devm API to cleanup module's resources
        ...
      f3033eb7
    • Linus Torvalds's avatar
      Merge tag 'backlight-next-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight · 7eae27cd
      Linus Torvalds authored
      Pull backlight updates from Lee Jones:
       "Fix-ups:
         - FB Backlight interaction overhaul
         - Remove superfluous code and simplify overall
         - Constify various structs and struct attributes
      
        Bug Fixes:
         - Repair LED flickering
         - Fix signedness bugs"
      
      * tag 'backlight-next-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: (42 commits)
        backlight: sky81452-backlight: Remove unnecessary call to of_node_get()
        backlight: mp3309c: Fix LEDs flickering in PWM mode
        backlight: otm3225a: Drop driver owner assignment
        backlight: lp8788: Drop support for platform data
        backlight: lcd: Make lcd_class constant
        backlight: Make backlight_class constant
        backlight: mp3309c: Fix signedness bug in mp3309c_parse_fwnode()
        const_structs.checkpatch: add lcd_ops
        fbdev: omap: lcd_ams_delta: Constify lcd_ops
        fbdev: imx: Constify lcd_ops
        fbdev: clps711x: Constify lcd_ops
        HID: picoLCD: Constify lcd_ops
        backlight: tdo24m: Constify lcd_ops
        backlight: platform_lcd: Constify lcd_ops
        backlight: otm3225a: Constify lcd_ops
        backlight: ltv350qv: Constify lcd_ops
        backlight: lms501kf03: Constify lcd_ops
        backlight: lms283gf05: Constify lcd_ops
        backlight: l4f00242t03: Constify lcd_ops
        backlight: jornada720_lcd: Constify lcd_ops
        ...
      7eae27cd
    • Linus Torvalds's avatar
      Merge tag 'mfd-next-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd · a85629f4
      Linus Torvalds authored
      Pull MFD updates from Lee Jones:
       "New Device Support:
         - Add support for X-Powers AXP717 PMIC to AXP22X
         - Add support for Rockchip RK816 PMIC to RK8XX
         - Add support for TI TPS65224 PMIC to TPS6594
      
        New Functionality:
         - Add Power Off functionality to Rohm BD71828
         - Allow I2C SMBus access in Renesas RSMU
      
        Fix-ups:
         - Device Tree binding adaptions/conversions/creation
         - Shift Intel support over to MSI interrupts
         - Generify adding platform data away from being ACPI specific
         - Use device core supplied attribute to register sysfs entries
         - Replace hand-rolled functionality with generic APIs
         - Utilise centrally provided helpers and macros
         - Clean-up error handling
         - Remove superfluous/duplicated/unused sections
         - Trivial; spelling, whitespace, coding-style adaptions
         - More Maple Tree conversions"
      
      * tag 'mfd-next-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (44 commits)
        dt-bindings: mfd: Use full path to other schemas
        mfd: rsmu: support I2C SMBus access
        dt-bindings: mfd: Convert lp873x.txt to json-schema
        dt-bindings: mfd: aspeed: Drop 'oneOf' for pinctrl node
        dt-bindings: mfd: allwinner,sun6i-a31-prcm: Use hyphens in node names
        mfd: ssbi: Remove unused field 'slave' from 'struct ssbi'
        mfd: kempld: Remove custom DMI matching code
        mfd: cs42l43: Update patching revision check
        dt-bindings: mfd: qcom: pm8xxx: Add pm8901 compatible
        mfd: timberdale: Remove redundant assignment to variable err
        dt-bindings: mfd: qcom,spmi-pmic: Add pbs to SPMI device types
        dt-bindings: mfd: syscon: Add ti,am62p-cpsw-mac-efuse compatible
        dt-bindings: mfd: qcom,tcsr: Add compatible for SDX75
        mfd: axp20x: Convert to use Maple Tree register cache
        mfd: bd71828: Remove commented code lines
        mfd: intel-m10-bmc: Change staging size to a variable
        dt-bindings: mfd: Add ROHM BD71879
        mfd: Tidy Kconfig dependency's parentheses
        mfd: ocelot-spi: Use spi_sync_transfer()
        dt-bindings: mfd: syscon: Add missing simple syscon compatibles
        ...
      a85629f4
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-6.10-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 0bfbc914
      Linus Torvalds authored
      Pull RISC-V updates from Palmer Dabbelt:
      
       - Add byte/half-word compare-and-exchange, emulated via LR/SC loops
      
       - Support for Rust
      
       - Support for Zihintpause in hwprobe
      
       - Add PR_RISCV_SET_ICACHE_FLUSH_CTX prctl()
      
       - Support lockless lockrefs
      
      * tag 'riscv-for-linus-6.10-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (42 commits)
        riscv: defconfig: Enable CONFIG_CLK_SOPHGO_CV1800
        riscv: select ARCH_HAS_FAST_MULTIPLIER
        riscv: mm: still create swiotlb buffer for kmalloc() bouncing if required
        riscv: Annotate pgtable_l{4,5}_enabled with __ro_after_init
        riscv: Remove redundant CONFIG_64BIT from pgtable_l{4,5}_enabled
        riscv: mm: Always use an ASID to flush mm contexts
        riscv: mm: Preserve global TLB entries when switching contexts
        riscv: mm: Make asid_bits a local variable
        riscv: mm: Use a fixed layout for the MM context ID
        riscv: mm: Introduce cntx2asid/cntx2version helper macros
        riscv: Avoid TLB flush loops when affected by SiFive CIP-1200
        riscv: Apply SiFive CIP-1200 workaround to single-ASID sfence.vma
        riscv: mm: Combine the SMP and UP TLB flush code
        riscv: Only send remote fences when some other CPU is online
        riscv: mm: Broadcast kernel TLB flushes only when needed
        riscv: Use IPIs for remote cache/TLB flushes by default
        riscv: Factor out page table TLB synchronization
        riscv: Flush the instruction cache during SMP bringup
        riscv: hwprobe: export Zihintpause ISA extension
        riscv: misaligned: remove CONFIG_RISCV_M_MODE specific code
        ...
      0bfbc914
    • Linus Torvalds's avatar
      Merge tag 'loongarch-6.10' of... · 4f05e820
      Linus Torvalds authored
      Merge tag 'loongarch-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
      
      Pull LoongArch updates from Huacai Chen:
      
       - Select some options in Kconfig
      
       - Give a chance to build with !CONFIG_SMP
      
       - Switch to use built-in rustc target
      
       - Add new supported device nodes to dts
      
       - Some bug fixes and other small changes
      
       - Update the default config file
      
      * tag 'loongarch-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson:
        LoongArch: Update Loongson-3 default config file
        LoongArch: dts: Add new supported device nodes to Loongson-2K2000
        LoongArch: dts: Add new supported device nodes to Loongson-2K0500
        LoongArch: dts: Remove "disabled" state of clock controller node
        LoongArch: rust: Switch to use built-in rustc target
        LoongArch: Fix callchain parse error with kernel tracepoint events again
        LoongArch: Give a chance to build with !CONFIG_SMP
        LoongArch: Select THP_SWAP if HAVE_ARCH_TRANSPARENT_HUGEPAGE
        LoongArch: Select ARCH_WANT_DEFAULT_BPF_JIT
        LoongArch: Select ARCH_SUPPORTS_INT128 if CC_HAS_INT128
        LoongArch: Select ARCH_HAS_FAST_MULTIPLIER
      4f05e820
    • Linus Torvalds's avatar
      Merge tag 'microblaze-v6.10' of git://git.monstr.eu/linux-2.6-microblaze · f33fda22
      Linus Torvalds authored
      Pull microblaze updates from Michal Simek:
      
       - Cleanup code around removed early_printk
      
      * tag 'microblaze-v6.10' of git://git.monstr.eu/linux-2.6-microblaze:
        microblaze: Remove early printk call from cpuinfo-static.c
        microblaze: Remove gcc flag for non existing early_printk.c file
      f33fda22
    • Linus Torvalds's avatar
      Merge tag 'ovl-update-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs · 0e22bedd
      Linus Torvalds authored
      Pull overlayfs updates from Miklos Szeredi:
      
       - Add tmpfile support
      
       - Clean up include
      
      * tag 'ovl-update-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs:
        ovl: remove duplicate included header
        ovl: remove upper umask handling from ovl_create_upper()
        ovl: implement tmpfile
      0e22bedd
    • Linus Torvalds's avatar
      Merge tag 'fuse-update-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse · 4f2d34b6
      Linus Torvalds authored
      Pull fuse updates from Miklos Szeredi:
      
       - Add fs-verity support (Richard Fung)
      
       - Add multi-queue support to virtio-fs (Peter-Jan Gootzen)
      
       - Fix a bug in NOTIFY_RESEND handling (Hou Tao)
      
       - page -> folio cleanup (Matthew Wilcox)
      
      * tag 'fuse-update-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
        virtio-fs: add multi-queue support
        virtio-fs: limit number of request queues
        fuse: clear FR_SENT when re-adding requests into pending list
        fuse: set FR_PENDING atomically in fuse_resend()
        fuse: Add initial support for fs-verity
        fuse: Convert fuse_readpages_end() to use folio_end_read()
      4f2d34b6
    • Yafang Shao's avatar
      vfs: Delete the associated dentry when deleting a file · 681ce862
      Yafang Shao authored
      Our applications, built on Elasticsearch[0], frequently create and
      delete files.  These applications operate within containers, some with a
      memory limit exceeding 100GB.  Over prolonged periods, the accumulation
      of negative dentries within these containers can amount to tens of
      gigabytes.
      
      Upon container exit, directories are deleted.  However, due to the
      numerous associated dentries, this process can be time-consuming.  Our
      users have expressed frustration with this prolonged exit duration,
      which constitutes our first issue.
      
      Simultaneously, other processes may attempt to access the parent
      directory of the Elasticsearch directories.  Since the task responsible
      for deleting the dentries holds the inode lock, processes attempting
      directory lookup experience significant delays.  This issue, our second
      problem, is easily demonstrated:
      
        - Task 1 generates negative dentries:
        $ pwd
        ~/test
        $ mkdir es && cd es/ && ./create_and_delete_files.sh
      
        [ After generating tens of GB dentries ]
      
        $ cd ~/test && rm -rf es
      
        [ It will take a long duration to finish ]
      
        - Task 2 attempts to lookup the 'test/' directory
        $ pwd
        ~/test
        $ ls
      
        The 'ls' command in Task 2 experiences prolonged execution as Task 1
        is deleting the dentries.
      
      We've devised a solution to address both issues by deleting associated
      dentry when removing a file.  Interestingly, we've noted that a similar
      patch was proposed years ago[1], although it was rejected citing the
      absence of tangible issues caused by negative dentries.  Given our
      current challenges, we're resubmitting the proposal.  All relevant
      stakeholders from previous discussions have been included for reference.
      
      Some alternative solutions are also under discussion[2][3], such as
      shrinking child dentries outside of the parent inode lock or even
      asynchronously shrinking child dentries.  However, given the
      straightforward nature of the current solution, I believe this approach
      is still necessary.
      
      [ NOTE! This is a pretty fundamental change in how we deal with
        unlinking dentries, and it doesn't change the fact that you can have
        lots of negative dentries from just doing negative lookups.
      
        But the kernel test robot is at least initially happy with this from a
        performance angle, so I'm applying this ASAP just to get more testing
        and as a "known fix for an issue people hit in real life".
      
        Put another way: we should still look at the alternatives, and this
        patch may get reverted if somebody finds a performance regression on
        some other load.       - Linus ]
      Suggested-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarYafang Shao <laoar.shao@gmail.com>
      Link: https://github.com/elastic/elasticsearch [0]
      Link: https://patchwork.kernel.org/project/linux-fsdevel/patch/1502099673-31620-1-git-send-email-wangkai86@huawei.com [1]
      Link: https://lore.kernel.org/linux-fsdevel/20240511200240.6354-2-torvalds@linux-foundation.org/ [2]
      Link: https://lore.kernel.org/linux-fsdevel/CAHk-=wjEMf8Du4UFzxuToGDnF3yLaMcrYeyNAaH1NJWa6fwcNQ@mail.gmail.com/ [3]
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Christian Brauner <brauner@kernel.org>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Waiman Long <longman@redhat.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Wangkai <wangkai86@huawei.com>
      Cc: Colin Walters <walters@verbum.org>
      Tested-by: default avatarkernel test robot <oliver.sang@intel.com>
      Link: https://lore.kernel.org/all/202405221518.ecea2810-oliver.sang@intel.com/Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      681ce862
    • Li Zhang's avatar
      virtio-pci: Check if is_avq is NULL · c8fae27d
      Li Zhang authored
      [bug]
      In the virtio_pci_common.c function vp_del_vqs, vp_dev->is_avq is involved
      to determine whether it is admin virtqueue, but this function vp_dev->is_avq
       may be empty. For installations, virtio_pci_legacy does not assign a value
       to vp_dev->is_avq.
      
      [fix]
      Check whether it is vp_dev->is_avq before use.
      
      [test]
      Test with virsh Attach device
      Before this patch, the following command would crash the guest system
      
      After applying the patch, everything seems to be working fine.
      Signed-off-by: default avatarLi Zhang <zhanglikernel@gmail.com>
      Message-Id: <1710566754-3532-1-git-send-email-zhanglikernel@gmail.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      c8fae27d
    • Michael S. Tsirkin's avatar
      Merge tag 'stable/vduse-virtio-net' into vhost · c0a7233f
      Michael S. Tsirkin authored
      This adds support for virtio-net to vduse.
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      c0a7233f
    • Jiri Pirko's avatar
      virtio: delete vq in vp_find_vqs_msix() when request_irq() fails · 89875151
      Jiri Pirko authored
      When request_irq() fails, error path calls vp_del_vqs(). There, as vq is
      present in the list, free_irq() is called for the same vector. That
      causes following splat:
      
      [    0.414355] Trying to free already-free IRQ 27
      [    0.414403] WARNING: CPU: 1 PID: 1 at kernel/irq/manage.c:1899 free_irq+0x1a1/0x2d0
      [    0.414510] Modules linked in:
      [    0.414540] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 6.9.0-rc4+ #27
      [    0.414540] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-1.fc39 04/01/2014
      [    0.414540] RIP: 0010:free_irq+0x1a1/0x2d0
      [    0.414540] Code: 1e 00 48 83 c4 08 48 89 e8 5b 5d 41 5c 41 5d 41 5e 41 5f c3 cc cc cc cc 90 8b 74 24 04 48 c7 c7 98 80 6c b1 e8 00 c9 f7 ff 90 <0f> 0b 90 90 48 89 ee 4c 89 ef e8 e0 20 b8 00 49 8b 47 40 48 8b 40
      [    0.414540] RSP: 0000:ffffb71480013ae0 EFLAGS: 00010086
      [    0.414540] RAX: 0000000000000000 RBX: ffffa099c2722000 RCX: 0000000000000000
      [    0.414540] RDX: 0000000000000000 RSI: ffffb71480013998 RDI: 0000000000000001
      [    0.414540] RBP: 0000000000000246 R08: 00000000ffffdfff R09: 0000000000000001
      [    0.414540] R10: 00000000ffffdfff R11: ffffffffb18729c0 R12: ffffa099c1c91760
      [    0.414540] R13: ffffa099c1c916a4 R14: ffffa099c1d2f200 R15: ffffa099c1c91600
      [    0.414540] FS:  0000000000000000(0000) GS:ffffa099fec40000(0000) knlGS:0000000000000000
      [    0.414540] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [    0.414540] CR2: 0000000000000000 CR3: 0000000008e3e001 CR4: 0000000000370ef0
      [    0.414540] Call Trace:
      [    0.414540]  <TASK>
      [    0.414540]  ? __warn+0x80/0x120
      [    0.414540]  ? free_irq+0x1a1/0x2d0
      [    0.414540]  ? report_bug+0x164/0x190
      [    0.414540]  ? handle_bug+0x3b/0x70
      [    0.414540]  ? exc_invalid_op+0x17/0x70
      [    0.414540]  ? asm_exc_invalid_op+0x1a/0x20
      [    0.414540]  ? free_irq+0x1a1/0x2d0
      [    0.414540]  vp_del_vqs+0xc1/0x220
      [    0.414540]  vp_find_vqs_msix+0x305/0x470
      [    0.414540]  vp_find_vqs+0x3e/0x1a0
      [    0.414540]  vp_modern_find_vqs+0x1b/0x70
      [    0.414540]  init_vqs+0x387/0x600
      [    0.414540]  virtnet_probe+0x50a/0xc80
      [    0.414540]  virtio_dev_probe+0x1e0/0x2b0
      [    0.414540]  really_probe+0xc0/0x2c0
      [    0.414540]  ? __pfx___driver_attach+0x10/0x10
      [    0.414540]  __driver_probe_device+0x73/0x120
      [    0.414540]  driver_probe_device+0x1f/0xe0
      [    0.414540]  __driver_attach+0x88/0x180
      [    0.414540]  bus_for_each_dev+0x85/0xd0
      [    0.414540]  bus_add_driver+0xec/0x1f0
      [    0.414540]  driver_register+0x59/0x100
      [    0.414540]  ? __pfx_virtio_net_driver_init+0x10/0x10
      [    0.414540]  virtio_net_driver_init+0x90/0xb0
      [    0.414540]  do_one_initcall+0x58/0x230
      [    0.414540]  kernel_init_freeable+0x1a3/0x2d0
      [    0.414540]  ? __pfx_kernel_init+0x10/0x10
      [    0.414540]  kernel_init+0x1a/0x1c0
      [    0.414540]  ret_from_fork+0x31/0x50
      [    0.414540]  ? __pfx_kernel_init+0x10/0x10
      [    0.414540]  ret_from_fork_asm+0x1a/0x30
      [    0.414540]  </TASK>
      
      Fix this by calling deleting the current vq when request_irq() fails.
      
      Fixes: 0b0f9dc5 ("Revert "virtio_pci: use shared interrupts for virtqueues"")
      Signed-off-by: default avatarJiri Pirko <jiri@nvidia.com>
      Message-Id: <20240426150845.3999481-1-jiri@resnulli.us>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      89875151
    • Eugenio Pérez's avatar
      MAINTAINERS: add Eugenio Pérez as reviewer · 10e49da8
      Eugenio Pérez authored
      Add myself as a reviewer of some VirtIO areas I'm interested.
      
      Until this point I've been scanning manually the list looking for
      series that touches this area.  Adding myself to make this task easier.
      Signed-off-by: default avatarEugenio Pérez <eperezma@redhat.com>
      Message-Id: <20240213182450.106796-1-eperezma@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      10e49da8
    • Christophe JAILLET's avatar
      vhost-vdpa: Remove usage of the deprecated ida_simple_xx() API · f452001d
      Christophe JAILLET authored
      ida_alloc() and ida_free() should be preferred to the deprecated
      ida_simple_get() and ida_simple_remove().
      
      Note that the upper limit of ida_simple_get() is exclusive, but the one of
      ida_alloc_max() is inclusive. So a -1 has been added when needed.
      Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Message-Id: <67c2edf49788c27d5f7a49fc701520b9fcf739b5.1713088999.git.christophe.jaillet@wanadoo.fr>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Acked-by: default avatarJason Wang <jasowang@redhat.com>
      f452001d
    • Yuxue Liu's avatar
      vp_vdpa: don't allocate unused msix vectors · 4d685629
      Yuxue Liu authored
      When there is a ctlq and it doesn't require interrupt
      callbacks,the original method of calculating vectors
      wastes hardware msi or msix resources as well as system
      IRQ resources.
      
      When conducting performance testing using testpmd in the
      guest os, it was found that the performance was lower compared
      to directly using vfio-pci to passthrough the device
      
      In scenarios where the virtio device in the guest os does
      not utilize interrupts, the vdpa driver still configures
      the hardware's msix vector. Therefore, the hardware still
      sends interrupts to the host os. Because of this unnecessary
      action by the hardware, hardware performance decreases, and
      it also affects the performance of the host os.
      
      Before modification:(interrupt mode)
       32:  0   0  0  0 PCI-MSI 32768-edge    vp-vdpa[0000:00:02.0]-0
       33:  0   0  0  0 PCI-MSI 32769-edge    vp-vdpa[0000:00:02.0]-1
       34:  0   0  0  0 PCI-MSI 32770-edge    vp-vdpa[0000:00:02.0]-2
       35:  0   0  0  0 PCI-MSI 32771-edge    vp-vdpa[0000:00:02.0]-config
      
      After modification:(interrupt mode)
       32:  0  0  1  7   PCI-MSI 32768-edge  vp-vdpa[0000:00:02.0]-0
       33: 36  0  3  0   PCI-MSI 32769-edge  vp-vdpa[0000:00:02.0]-1
       34:  0  0  0  0   PCI-MSI 32770-edge  vp-vdpa[0000:00:02.0]-config
      
      Before modification:(virtio pmd mode for guest os)
       32:  0   0  0  0 PCI-MSI 32768-edge    vp-vdpa[0000:00:02.0]-0
       33:  0   0  0  0 PCI-MSI 32769-edge    vp-vdpa[0000:00:02.0]-1
       34:  0   0  0  0 PCI-MSI 32770-edge    vp-vdpa[0000:00:02.0]-2
       35:  0   0  0  0 PCI-MSI 32771-edge    vp-vdpa[0000:00:02.0]-config
      
      After modification:(virtio pmd mode for guest os)
       32: 0  0  0   0   PCI-MSI 32768-edge   vp-vdpa[0000:00:02.0]-config
      
      To verify the use of the virtio PMD mode in the guest operating
      system, the following patch needs to be applied to QEMU:
      https://lore.kernel.org/all/20240408073311.2049-1-yuxue.liu@jaguarmicro.comSigned-off-by: default avatarYuxue Liu <yuxue.liu@jaguarmicro.com>
      Acked-by: default avatarJason Wang <jasowang@redhat.com>
      Reviewed-by: default avatarHeng Qi <hengqi@linux.alibaba.com>
      Message-Id: <20240410033020.1310-1-yuxue.liu@jaguarmicro.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      4d685629
    • Krzysztof Kozlowski's avatar
      sound: virtio: drop owner assignment · 1fa74f24
      Krzysztof Kozlowski authored
      virtio core already sets the .owner, so driver does not need to.
      Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
      
      Message-Id: <20240331-module-owner-virtio-v2-25-98f04bfaf46a@linaro.org>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Acked-by: default avatarAnton Yakovlev <anton.yakovlev@opensynergy.com>
      1fa74f24
    • Krzysztof Kozlowski's avatar
      fuse: virtio: drop owner assignment · bc21020f
      Krzysztof Kozlowski authored
      virtio core already sets the .owner, so driver does not need to.
      Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
      
      Message-Id: <20240331-module-owner-virtio-v2-24-98f04bfaf46a@linaro.org>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      bc21020f
    • Krzysztof Kozlowski's avatar
      scsi: virtio: drop owner assignment · e1e4d376
      Krzysztof Kozlowski authored
      virtio core already sets the .owner, so driver does not need to.
      Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
      
      Message-Id: <20240331-module-owner-virtio-v2-23-98f04bfaf46a@linaro.org>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Acked-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      e1e4d376
    • Krzysztof Kozlowski's avatar
      rpmsg: virtio: drop owner assignment · f42c7405
      Krzysztof Kozlowski authored
      virtio core already sets the .owner, so driver does not need to.
      Reviewed-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
      Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
      Message-Id: <20240331-module-owner-virtio-v2-22-98f04bfaf46a@linaro.org>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      f42c7405
    • Krzysztof Kozlowski's avatar
      nvdimm: virtio_pmem: drop owner assignment · 9dceed1b
      Krzysztof Kozlowski authored
      virtio core already sets the .owner, so driver does not need to.
      Acked-by: default avatarDave Jiang <dave.jiang@intel.com>
      Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
      Message-Id: <20240331-module-owner-virtio-v2-21-98f04bfaf46a@linaro.org>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com
      Reviewed-by: default avatarPankaj Gupta <pankaj.gupta@amd.com>
      9dceed1b
    • Krzysztof Kozlowski's avatar
      wifi: mac80211_hwsim: drop owner assignment · 19680c70
      Krzysztof Kozlowski authored
      virtio core already sets the .owner, so driver does not need to.
      Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
      
      Message-Id: <20240331-module-owner-virtio-v2-20-98f04bfaf46a@linaro.org>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      19680c70
    • Krzysztof Kozlowski's avatar
      vsock/virtio: drop owner assignment · b1c16d4a
      Krzysztof Kozlowski authored
      virtio core already sets the .owner, so driver does not need to.
      Acked-by: default avatarStefano Garzarella <sgarzare@redhat.com>
      Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
      Message-Id: <20240331-module-owner-virtio-v2-19-98f04bfaf46a@linaro.org>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      b1c16d4a
    • Krzysztof Kozlowski's avatar
      net: 9p: virtio: drop owner assignment · d26dd255
      Krzysztof Kozlowski authored
      virtio core already sets the .owner, so driver does not need to.
      Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
      
      Message-Id: <20240331-module-owner-virtio-v2-18-98f04bfaf46a@linaro.org>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      d26dd255