1. May 30, 2023
    • Stephan Gerhold's avatar
      spi: qup: Request DMA before enabling clocks · 0c331fd1
      Stephan Gerhold authored
      It is usually better to request all necessary resources (clocks,
      regulators, ...) before starting to make use of them. That way they do
      not change state in case one of the resources is not available yet and
      probe deferral (-EPROBE_DEFER) is necessary. This is particularly
      important for DMA channels and IOMMUs which are not enforced by
      fw_devlink yet (unless you use fw_devlink.strict=1).
      
      spi-qup does this in the wrong order, the clocks are enabled and
      disabled again when the DMA channels are not available yet.
      
      This causes issues in some cases: On most SoCs one of the SPI QUP
      clocks is shared with the UART controller. When using earlycon UART is
      actively used during boot but might not have probed yet, usually for
      the same reason (waiting for the DMA controller). In this case, the
      brief enable/disable cycle ends up gating the clock and further UART
      console output will halt the system completely.
      
      Avoid this by requesting the DMA channels before changing the clock
      state.
      
      Fixes: 612762e8
      
       ("spi: qup: Add DMA capabilities")
      Signed-off-by: default avatarStephan Gerhold <stephan@gerhold.net>
      Link: https://lore.kernel.org/r/20230518-spi-qup-clk-defer-v1-1-f49fc9ca4e02@gerhold.net
      
      
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      0c331fd1
  2. May 24, 2023
    • Daniel Golle's avatar
      spi: mt65xx: make sure operations completed before unloading · 4be47a5d
      Daniel Golle authored
      When unloading the spi-mt65xx kernel module during an ongoing spi-mem
      operation the kernel will Oops shortly after unloading the module.
      This is because wait_for_completion_timeout was still running and
      returning into the no longer loaded module:
      
      Internal error: Oops: 0000000096000005 [#1] SMP
      Modules linked in: [many, but spi-mt65xx is no longer there]
      CPU: 0 PID: 2578 Comm: block Tainted: G        W  O       6.3.0-next-20230428+ #0
      Hardware name: Bananapi BPI-R3 (DT)
      pstate: 804000c5 (Nzcv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
      pc : __lock_acquire+0x18c/0x20e8
      lr : __lock_acquire+0x9b8/0x20e8
      sp : ffffffc009ec3400
      x29: ffffffc009ec3400 x28: 0000000000000001 x27: 0000000000000004
      x26: ffffff80082888c8 x25: 0000000000000000 x24: 0000000000000000
      x23: ffffffc009609da8 x22: ffffff8008288000 x21: ffffff8008288968
      x20: 00000000000003c2 x19: ffffff8008be7990 x18: 00000000000002af
      x17: 0000000000000000 x16: 0000000000000000 x15: ffffffc008d78970
      x14: 000000000000080d x13: 00000000000002af x12: 00000000ffffffea
      x11: 00000000ffffefff x10: ffffffc008dd0970 x9 : ffffffc008d78918
      x8 : 0000000000017fe8 x7 : 0000000000000001 x6 : 0000000000000000
      x5 : ffffff807fb53910 x4 : 0000000000000000 x3 : 0000000000000027
      x2 : 0000000000000027 x1 : 0000000000000000 x0 : 00000000000c03c2
      Call trace:
       __lock_acquire+0x18c/0x20e8
       lock_acquire+0x100/0x2a4
       _raw_spin_lock_irq+0x58/0x74
       __wait_for_common+0xe0/0x1b4
       wait_for_completion_timeout+0x1c/0x24
       0xffffffc000acc8a4 <--- used to be mtk_spi_transfer_wait
       spi_mem_exec_op+0x390/0x3ec
       spi_mem_no_dirmap_read+0x6c/0x88
       spi_mem_dirmap_read+0xcc/0x12c
       spinand_read_page+0xf8/0x1dc
       spinand_mtd_read+0x1b4/0x2fc
       mtd_read_oob_std+0x58/0x7c
       mtd_read_oob+0x8c/0x148
       mtd_read+0x50/0x6c
       ...
      
      Prevent this by completing in mtk_spi_remove if needed.
      
      Fixes: 9f763fd2
      
       ("spi: mediatek: add spi memory support for ipm design")
      Signed-off-by: default avatarDaniel Golle <daniel@makrotopia.org>
      Link: https://lore.kernel.org/r/ZFAF6pJxMu1z6k4w@makrotopia.org
      
      
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      4be47a5d
    • Clark Wang's avatar
      spi: lpspi: disable lpspi module irq in DMA mode · 9728fb3c
      Clark Wang authored
      
      
      When all bits of IER are set to 0, we still can observe the lpspi irq events
      when using DMA mode to transfer data.
      
      So disable irq to avoid the too much irq events.
      
      Signed-off-by: default avatarClark Wang <xiaoning.wang@nxp.com>
      Link: https://lore.kernel.org/r/20230505063557.3962220-1-xiaoning.wang@nxp.com
      
      
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      9728fb3c
  3. May 22, 2023
  4. May 16, 2023
  5. May 15, 2023
  6. May 11, 2023
  7. May 08, 2023
    • Linus Torvalds's avatar
      Linux 6.4-rc1 · ac9a7868
      Linus Torvalds authored
      ac9a7868
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-for-v6.4-3-2023-05-06' of... · f085df1b
      Linus Torvalds authored
      Merge tag 'perf-tools-for-v6.4-3-2023-05-06' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull perf tool updates from Arnaldo Carvalho de Melo:
       "Third version of perf tool updates, with the build problems with with
        using a 'vmlinux.h' generated from the main build fixed, and the bpf
        skeleton build disabled by default.
      
        Build:
      
         - Require libtraceevent to build, one can disable it using
           NO_LIBTRACEEVENT=1.
      
           It is required for tools like 'perf sched', 'perf kvm', 'perf
           trace', etc.
      
           libtraceevent is available in most distros so installing
           'libtraceevent-devel' should be a one-time event to continue
           building perf as usual.
      
           Using NO_LIBTRACEEVENT=1 produces tooling that is functional and
           sufficient for lots of users not interested in those libtraceevent
           dependent features.
      
         - Allow Python support in 'perf script' when libtraceevent isn't
           linked, as not all features requires it, for instance Intel PT does
           not use tracepoints.
      
       ...
      f085df1b
    • Linus Torvalds's avatar
      Merge tag 'core-debugobjects-2023-05-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 17784de6
      Linus Torvalds authored
      Pull debugobjects fix from Thomas Gleixner:
       "A single fix for debugobjects:
      
        The recent fix to ensure atomicity of lookup and allocation
        inadvertently broke the pool refill mechanism, so that debugobject
        OOMs now in certain situations. The reason is that the functions which
        got updated no longer invoke debug_objecs_init(), which is now the
        only place to care about refilling the tracking object pool.
      
        Restore the original behaviour by adding explicit refill opportunities
        to those places"
      
      * tag 'core-debugobjects-2023-05-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        debugobject: Ensure pool refill (again)
      17784de6
    • Linus Torvalds's avatar
      Merge tag 'v6.4-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · 6f69c981
      Linus Torvalds authored
      Pull crypto fixes from Herbert Xu:
      
       - A long-standing bug in crypto_engine
      
       - A buggy but harmless check in the sun8i-ss driver
      
       - A regression in the CRYPTO_USER interface
      
      * tag 'v6.4-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: api - Fix CRYPTO_USER checks for report function
        crypto: engine - fix crypto_queue backlog handling
        crypto: sun8i-ss - Fix a test in sun8i_ss_setup_ivs()
      6f69c981
    • Linus Torvalds's avatar
      Merge tag '6.4-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6 · 63342b1d
      Linus Torvalds authored
      Pull cifs fixes from Steve French:
       "smb3 client fixes, mostly DFS or reconnect related:
      
         - Two DFS connection sharing fixes
      
         - DFS refresh fix
      
         - Reconnect fix
      
         - Two potential use after free fixes
      
         - Also print prefix patch in mount debug msg
      
         - Two small cleanup fixes"
      
      * tag '6.4-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: Remove unneeded semicolon
        cifs: fix sharing of DFS connections
        cifs: avoid potential races when handling multiple dfs tcons
        cifs: protect access of TCP_Server_Info::{origin,leaf}_fullpath
        cifs: fix potential race when tree connecting ipc
        cifs: fix potential use-after-free bugs in TCP_Server_Info::hostname
        cifs: print smb3_fs_context::source when mounting
        cifs: protect session status check in smb2_reconnect()
        SMB3.1.1: correct definition for app_instance_id create contexts
      63342b1d
    • Linus Torvalds's avatar
      Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · d6b8a8c4
      Linus Torvalds authored
      Pull clk fixes from Stephen Boyd:
       "A couple more patches that would be good to get into -rc1:
      
         - Revert an i.MX patch that's causing video failures because division
           math goes sideways
      
         - Fix a clang + W=1 build isue where FIELD_PREP() is taking a 32-bit
           variable instead of the usual u64 type
      
         - Fix a Kconfig bug in the StarFive JH7110 clk config that selects a
           reset controller when it can't be selected"
      
      * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
        clk: starfive: Fix RESET_STARFIVE_JH7110 can't be selected in a specified case
        clk: sp7021: Adjust width of _m in HWM_FIELD_PREP()
        Revert "clk: imx: composite-8m: Add support to determine_rate"
      d6b8a8c4
    • Linus Torvalds's avatar
      Merge tag 'mailbox-v6.4' of git://git.linaro.org/landing-teams/working/fujitsu/integration · 1c1094e4
      Linus Torvalds authored
      Pull mailbox updates from Jassi Brar:
      
       - mailbox api: allow direct registration to a channel and convert omap
         and pcc to use mbox_bind_client
      
       - omap and hi6220 : use of_property_read_bool
      
       - test: fix double-free and use spinlock header
      
       - rockchip and bcm-pdc: drop of_match_ptr
      
       - mpfs: change config symbol
      
       - mediatek gce: support MT6795
      
       - qcom apcs: consolidate of_device_id and support IPQ9574
      
      * tag 'mailbox-v6.4' of git://git.linaro.org/landing-teams/working/fujitsu/integration:
        dt-bindings: mailbox: qcom: add compatible for IPQ9574 SoC
        mailbox: qcom-apcs-ipc: do not grow the of_device_id
        dt-bindings: mailbox: qcom,apcs-kpss-global: use fallbacks for few variants
        dt-bindings: mailbox: mediatek,gce-mailbox: Add support for MT6795
        mailbox: mpfs: convert SOC_MICROCHIP_POLARFIRE to ARCH_MICROCHIP_POLARFIRE
        mailbox: bcm-pdc: drop of_match_ptr for ID table
        mailbox: rockchip: drop of_match_pt...
      1c1094e4
    • Linus Torvalds's avatar
      Merge tag 'for-6.4/io_uring-2023-05-07' of git://git.kernel.dk/linux · 03e5cb7b
      Linus Torvalds authored
      Pull more io_uring updates from Jens Axboe:
       "Nothing major in here, just two different parts:
      
         - A small series from Breno that enables passing the full SQE down
           for ->uring_cmd().
      
           This is a prerequisite for enabling full network socket operations.
           Queued up a bit late because of some stylistic concerns that got
           resolved, would be nice to have this in 6.4-rc1 so the dependent
           work will be easier to handle for 6.5.
      
         - Fix for the huge page coalescing, which was a regression introduced
           in the 6.3 kernel release (Tobias)"
      
      * tag 'for-6.4/io_uring-2023-05-07' of git://git.kernel.dk/linux:
        io_uring: Remove unnecessary BUILD_BUG_ON
        io_uring: Pass whole sqe to commands
        io_uring: Create a helper to return the SQE size
        io_uring/rsrc: check for nonconsecutive pages
      03e5cb7b
  8. May 07, 2023
  9. May 06, 2023
    • Linus Torvalds's avatar
      Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · dd9e11d6
      Linus Torvalds authored
      Pull more SCSI updates from James Bottomley:
       "Six late arriving patches for the merge window. Five are minor
        assorted fixes and updates.
      
        The IPR driver change removes SATA support, which will now allow a
        major cleanup in the ATA subsystem because it was the only driver
        still using the old attachment mechanism. The driver is only used on
        power systems and SATA was used to support a DVD device, which has
        long been moved to a different hba. IBM chose this route instead of
        porting ipr to the newer SATA interfaces"
      
      * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: qedi: Fix use after free bug in qedi_remove()
        scsi: ufs: core: mcq: Fix &hwq->cq_lock deadlock issue
        scsi: ipr: Remove several unused variables
        scsi: pm80xx: Log device registration
        scsi: ipr: Remove SATA support
        scsi: scsi_debug: Abort commands from scsi_debug_device_reset()
      dd9e11d6
    • Linus Torvalds's avatar
      Merge tag 'for-6.4/block-2023-05-06' of git://git.kernel.dk/linux · a3b111b0
      Linus Torvalds authored
      Pull more block updates from Jens Axboe:
      
       - MD pull request via Song:
            - Improve raid5 sequential IO performance on spinning disks, which
              fixes a regression since v6.0 (Jan Kara)
            - Fix bitmap offset types, which fixes an issue introduced in this
              merge window (Jonathan Derrick)
      
       - Cleanup of hweight type used for cgroup writeback (Maxim)
      
       - Fix a regression with the "has_submit_bio" changes across partitions
         (Ming)
      
       - Cleanup of QUEUE_FLAG_ADD_RANDOM clearing.
      
         We used to set this flag on queues non blk-mq queues, and hence some
         drivers clear it unconditionally. Since all of these have since been
         converted to true blk-mq drivers, drop the useless clear as the bit
         is not set (Chaitanya)
      
       - Fix the flags being set in a bio for a flush for drbd (Christoph)
      
       - Cleanup and deduplication of the code handling setting block device
         capacity (Damien)
      
       - Fix for ublk handling IO timeouts (Ming)
      
       - Fix for a regression in blk-cgroup teardown (Tao)
      
       - NBD documentation and code fixes (Eric)
      
       - Convert blk-integrity to using device_attributes rather than a second
         kobject to manage lifetimes (Thomas)
      
      * tag 'for-6.4/block-2023-05-06' of git://git.kernel.dk/linux:
        ublk: add timeout handler
        drbd: correctly submit flush bio on barrier
        mailmap: add mailmap entries for Jens Axboe
        block: Skip destroyed blkg when restart in blkg_destroy_all()
        writeback: fix call of incorrect macro
        md: Fix bitmap offset type in sb writer
        md/raid5: Improve performance for sequential IO
        docs nbd: userspace NBD now favors github over sourceforge
        block nbd: use req.cookie instead of req.handle
        uapi nbd: add cookie alias to handle
        uapi nbd: improve doc links to userspace spec
        blk-integrity: register sysfs attributes on struct device
        blk-integrity: convert to struct device_attribute
        blk-integrity: use sysfs_emit
        block/drivers: remove dead clear of random flag
        block: sync part's ->bd_has_submit_bio with disk's
        block: Cleanup set_capacity()/bdev_set_nr_sectors()
      a3b111b0