1. 12 Apr, 2023 4 commits
    • Shunsuke Mie's avatar
      dmaengine: dw-edma: Fix to enable to issue dma request on DMA processing · 970b17df
      Shunsuke Mie authored
      The issue_pending request is ignored while driver is processing a DMA
      request. Fix to issue the pending requests on any dma channel status.
      
      Fixes: e63d79d1 ("dmaengine: Add Synopsys eDMA IP core driver")
      Signed-off-by: default avatarShunsuke Mie <mie@igel.co.jp>
      Link: https://lore.kernel.org/r/20230411101758.438472-2-mie@igel.co.jpSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
      970b17df
    • Shunsuke Mie's avatar
      dmaengine: dw-edma: Fix to change for continuous transfer · a251994a
      Shunsuke Mie authored
      The dw-edma driver stops after processing a DMA request even if a request
      remains in the issued queue, which is not the expected behavior. The DMA
      engine API requires continuous processing.
      
      Add a trigger to start after one processing finished if there are requests
      remain.
      
      Fixes: e63d79d1 ("dmaengine: Add Synopsys eDMA IP core driver")
      Signed-off-by: default avatarShunsuke Mie <mie@igel.co.jp>
      Link: https://lore.kernel.org/r/20230411101758.438472-1-mie@igel.co.jpSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
      a251994a
    • Rob Herring's avatar
      dmaengine: qcom_hidma: Add explicit platform_device.h and of_device.h includes · 619d8ea9
      Rob Herring authored
      qcom_hidma uses of_dma_configure() which is declared in of_device.h.
      platform_device.h and of_device.h get implicitly included by of_platform.h,
      but that is going to be removed soon.
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Acked-by: default avatarSinan Kaya <okaya@kernel.org>
      Link: https://lore.kernel.org/r/20230410232654.1561462-1-robh@kernel.orgSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
      619d8ea9
    • Dmitry Baryshkov's avatar
      dma: gpi: remove spurious unlock in gpi_ch_init · 91d6a468
      Dmitry Baryshkov authored
      gpi_ch_init() doesn't lock the ctrl_lock mutex, so there is no need to
      unlock it too. Instead the mutex is handled by the function
      gpi_alloc_chan_resources(), which properly locks and unlocks the mutex.
      
      =====================================
      WARNING: bad unlock balance detected!
      6.3.0-rc5-00253-g99792582ded1-dirty #15 Not tainted
      -------------------------------------
      kworker/u16:0/9 is trying to release lock (&gpii->ctrl_lock) at:
      [<ffffb99d04e1284c>] gpi_alloc_chan_resources+0x108/0x5bc
      but there are no more locks to release!
      
      other info that might help us debug this:
      6 locks held by kworker/u16:0/9:
       #0: ffff575740010938 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x220/0x594
       #1: ffff80000809bdd0 (deferred_probe_work){+.+.}-{0:0}, at: process_one_work+0x220/0x594
       #2: ffff575740f2a0f8 (&dev->mutex){....}-{3:3}, at: __device_attach+0x38/0x188
       #3: ffff57574b5570f8 (&dev->mutex){....}-{3:3}, at: __device_attach+0x38/0x188
       #4: ffffb99d06a2f180 (of_dma_lock){+.+.}-{3:3}, at: of_dma_request_slave_channel+0x138/0x280
       #5: ffffb99d06a2ee20 (dma_list_mutex){+.+.}-{3:3}, at: dma_get_slave_channel+0x28/0x10c
      
      stack backtrace:
      CPU: 7 PID: 9 Comm: kworker/u16:0 Not tainted 6.3.0-rc5-00253-g99792582ded1-dirty #15
      Hardware name: Google Pixel 3 (DT)
      Workqueue: events_unbound deferred_probe_work_func
      Call trace:
       dump_backtrace+0xa0/0xfc
       show_stack+0x18/0x24
       dump_stack_lvl+0x60/0xac
       dump_stack+0x18/0x24
       print_unlock_imbalance_bug+0x130/0x148
       lock_release+0x270/0x300
       __mutex_unlock_slowpath+0x48/0x2cc
       mutex_unlock+0x20/0x2c
       gpi_alloc_chan_resources+0x108/0x5bc
       dma_chan_get+0x84/0x188
       dma_get_slave_channel+0x5c/0x10c
       gpi_of_dma_xlate+0x110/0x1a0
       of_dma_request_slave_channel+0x174/0x280
       dma_request_chan+0x3c/0x2d4
       geni_i2c_probe+0x544/0x63c
       platform_probe+0x68/0xc4
       really_probe+0x148/0x2ac
       __driver_probe_device+0x78/0xe0
       driver_probe_device+0x3c/0x160
       __device_attach_driver+0xb8/0x138
       bus_for_each_drv+0x84/0xe0
       __device_attach+0x9c/0x188
       device_initial_probe+0x14/0x20
       bus_probe_device+0xac/0xb0
       device_add+0x60c/0x7d8
       of_device_add+0x44/0x60
       of_platform_device_create_pdata+0x90/0x124
       of_platform_bus_create+0x15c/0x3c8
       of_platform_populate+0x58/0xf8
       devm_of_platform_populate+0x58/0xbc
       geni_se_probe+0xf0/0x164
       platform_probe+0x68/0xc4
       really_probe+0x148/0x2ac
       __driver_probe_device+0x78/0xe0
       driver_probe_device+0x3c/0x160
       __device_attach_driver+0xb8/0x138
       bus_for_each_drv+0x84/0xe0
       __device_attach+0x9c/0x188
       device_initial_probe+0x14/0x20
       bus_probe_device+0xac/0xb0
       deferred_probe_work_func+0x8c/0xc8
       process_one_work+0x2bc/0x594
       worker_thread+0x228/0x438
       kthread+0x108/0x10c
       ret_from_fork+0x10/0x20
      
      Fixes: 5d0c3533 ("dmaengine: qcom: Add GPI dma driver")
      Signed-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
      Link: https://lore.kernel.org/r/20230409233355.453741-1-dmitry.baryshkov@linaro.orgSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
      91d6a468
  2. 31 Mar, 2023 17 commits
  3. 17 Mar, 2023 9 commits
  4. 05 Mar, 2023 9 commits
    • Linus Torvalds's avatar
      Linux 6.3-rc1 · fe15c26e
      Linus Torvalds authored
      fe15c26e
    • Linus Torvalds's avatar
      cpumask: re-introduce constant-sized cpumask optimizations · 596ff4a0
      Linus Torvalds authored
      Commit aa47a7c2 ("lib/cpumask: deprecate nr_cpumask_bits") resulted
      in the cpumask operations potentially becoming hugely less efficient,
      because suddenly the cpumask was always considered to be variable-sized.
      
      The optimization was then later added back in a limited form by commit
      6f9c07be ("lib/cpumask: add FORCE_NR_CPUS config option"), but that
      FORCE_NR_CPUS option is not useful in a generic kernel and more of a
      special case for embedded situations with fixed hardware.
      
      Instead, just re-introduce the optimization, with some changes.
      
      Instead of depending on CPUMASK_OFFSTACK being false, and then always
      using the full constant cpumask width, this introduces three different
      cpumask "sizes":
      
       - the exact size (nr_cpumask_bits) remains identical to nr_cpu_ids.
      
         This is used for situations where we should use the exact size.
      
       - the "small" size (small_cpumask_bits) is the NR_CPUS constant if it
         fits in a single word and the bitmap operations thus end up able
         to trigger the "small_const_nbits()" optimizations.
      
         This is used for the operations that have optimized single-word
         cases that get inlined, notably the bit find and scanning functions.
      
       - the "large" size (large_cpumask_bits) is the NR_CPUS constant if it
         is an sufficiently small constant that makes simple "copy" and
         "clear" operations more efficient.
      
         This is arbitrarily set at four words or less.
      
      As a an example of this situation, without this fixed size optimization,
      cpumask_clear() will generate code like
      
              movl    nr_cpu_ids(%rip), %edx
              addq    $63, %rdx
              shrq    $3, %rdx
              andl    $-8, %edx
              callq   memset@PLT
      
      on x86-64, because it would calculate the "exact" number of longwords
      that need to be cleared.
      
      In contrast, with this patch, using a MAX_CPU of 64 (which is quite a
      reasonable value to use), the above becomes a single
      
      	movq $0,cpumask
      
      instruction instead, because instead of caring to figure out exactly how
      many CPU's the system has, it just knows that the cpumask will be a
      single word and can just clear it all.
      
      Note that this does end up tightening the rules a bit from the original
      version in another way: operations that set bits in the cpumask are now
      limited to the actual nr_cpu_ids limit, whereas we used to do the
      nr_cpumask_bits thing almost everywhere in the cpumask code.
      
      But if you just clear bits, or scan for bits, we can use the simpler
      compile-time constants.
      
      In the process, remove 'cpumask_complement()' and 'for_each_cpu_not()'
      which were not useful, and which fundamentally have to be limited to
      'nr_cpu_ids'.  Better remove them now than have somebody introduce use
      of them later.
      
      Of course, on x86-64 with MAXSMP there is no sane small compile-time
      constant for the cpumask sizes, and we end up using the actual CPU bits,
      and will generate the above kind of horrors regardless.  Please don't
      use MAXSMP unless you really expect to have machines with thousands of
      cores.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      596ff4a0
    • Linus Torvalds's avatar
      Merge tag 'v6.3-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · f915322f
      Linus Torvalds authored
      Pull crypto fix from Herbert Xu:
       "Fix a regression in the caam driver"
      
      * tag 'v6.3-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: caam - Fix edesc/iv ordering mixup
      f915322f
    • Linus Torvalds's avatar
      Merge tag 'x86-urgent-2023-03-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 7f9ec7d8
      Linus Torvalds authored
      Pull x86 updates from Thomas Gleixner:
       "A small set of updates for x86:
      
         - Return -EIO instead of success when the certificate buffer for SEV
           guests is not large enough
      
         - Allow STIPB to be enabled with legacy IBSR. Legacy IBRS is cleared
           on return to userspace for performance reasons, but the leaves user
           space vulnerable to cross-thread attacks which STIBP prevents.
           Update the documentation accordingly"
      
      * tag 'x86-urgent-2023-03-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        virt/sev-guest: Return -EIO if certificate buffer is not large enough
        Documentation/hw-vuln: Document the interaction between IBRS and STIBP
        x86/speculation: Allow enabling STIBP with legacy IBRS
      7f9ec7d8
    • Linus Torvalds's avatar
      Merge tag 'irq-urgent-2023-03-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 4e9c542c
      Linus Torvalds authored
      Pull irq updates from Thomas Gleixner:
       "A set of updates for the interrupt susbsystem:
      
         - Prevent possible NULL pointer derefences in
           irq_data_get_affinity_mask() and irq_domain_create_hierarchy()
      
         - Take the per device MSI lock before invoking code which relies on
           it being hold
      
         - Make sure that MSI descriptors are unreferenced before freeing
           them. This was overlooked when the platform MSI code was converted
           to use core infrastructure and results in a fals positive warning
      
         - Remove dead code in the MSI subsystem
      
         - Clarify the documentation for pci_msix_free_irq()
      
         - More kobj_type constification"
      
      * tag 'irq-urgent-2023-03-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        genirq/msi, platform-msi: Ensure that MSI descriptors are unreferenced
        genirq/msi: Drop dead domain name assignment
        irqdomain: Add missing NULL pointer check in irq_domain_create_hierarchy()
        genirq/irqdesc: Make kobj_type structures constant
        PCI/MSI: Clarify usage of pci_msix_free_irq()
        genirq/msi: Take the per-device MSI lock before validating the control structure
        genirq/ipi: Fix NULL pointer deref in irq_data_get_affinity_mask()
      4e9c542c
    • Linus Torvalds's avatar
      Merge tag 'pull-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 1a90673e
      Linus Torvalds authored
      Pull vfs update from Al Viro:
       "Adding Christian Brauner as VFS co-maintainer"
      
      * tag 'pull-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        Adding VFS co-maintainer
      1a90673e
    • Linus Torvalds's avatar
      Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 1a8d05a7
      Linus Torvalds authored
      Pull VM_FAULT_RETRY fixes from Al Viro:
       "Some of the page fault handlers do not deal with the following case
        correctly:
      
         - handle_mm_fault() has returned VM_FAULT_RETRY
      
         - there is a pending fatal signal
      
         - fault had happened in kernel mode
      
        Correct action in such case is not "return unconditionally" - fatal
        signals are handled only upon return to userland and something like
        copy_to_user() would end up retrying the faulting instruction and
        triggering the same fault again and again.
      
        What we need to do in such case is to make the caller to treat that as
        failed uaccess attempt - handle exception if there is an exception
        handler for faulting instruction or oops if there isn't one.
      
        Over the years some architectures had been fixed and now are handling
        that case properly; some still do not. This series should fix the
        remaining ones.
      
        Status:
      
         - m68k, riscv, hexagon, parisc: tested/acked by maintainers.
      
         - alpha, sparc32, sparc64: tested locally - bug has been reproduced
           on the unpatched kernel and verified to be fixed by this series.
      
         - ia64, microblaze, nios2, openrisc: build, but otherwise completely
           untested"
      
      * tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        openrisc: fix livelock in uaccess
        nios2: fix livelock in uaccess
        microblaze: fix livelock in uaccess
        ia64: fix livelock in uaccess
        sparc: fix livelock in uaccess
        alpha: fix livelock in uaccess
        parisc: fix livelock in uaccess
        hexagon: fix livelock in uaccess
        riscv: fix livelock in uaccess
        m68k: fix livelock in uaccess
      1a8d05a7
    • Masahiro Yamada's avatar
      Remove Intel compiler support · 95207db8
      Masahiro Yamada authored
      include/linux/compiler-intel.h had no update in the past 3 years.
      
      We often forget about the third C compiler to build the kernel.
      
      For example, commit a0a12c3e ("asm goto: eradicate CC_HAS_ASM_GOTO")
      only mentioned GCC and Clang.
      
      init/Kconfig defines CC_IS_GCC and CC_IS_CLANG but not CC_IS_ICC,
      and nobody has reported any issue.
      
      I guess the Intel Compiler support is broken, and nobody is caring
      about it.
      
      Harald Arnesen pointed out ICC (classic Intel C/C++ compiler) is
      deprecated:
      
          $ icc -v
          icc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is
          deprecated and will be removed from product release in the second half
          of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended
          compiler moving forward. Please transition to use this compiler. Use
          '-diag-disable=10441' to disable this message.
          icc version 2021.7.0 (gcc version 12.1.0 compatibility)
      
      Arnd Bergmann provided a link to the article, "Intel C/C++ compilers
      complete adoption of LLVM".
      
      lib/zstd/common/compiler.h and lib/zstd/compress/zstd_fast.c were kept
      untouched for better sync with https://github.com/facebook/zstd
      
      Link: https://www.intel.com/content/www/us/en/developer/articles/technical/adoption-of-llvm-complete-icx.htmlSigned-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Reviewed-by: default avatarNathan Chancellor <nathan@kernel.org>
      Reviewed-by: default avatarMiguel Ojeda <ojeda@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      95207db8
    • Al Viro's avatar
      Adding VFS co-maintainer · 3304f18b
      Al Viro authored
      Acked-by: default avatarChristian Brauner <brauner@kernel.org>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      3304f18b
  5. 04 Mar, 2023 1 commit