1. 29 Jun, 2022 3 commits
  2. 28 Jun, 2022 1 commit
    • Mark Brown's avatar
      Optimize spi_sync path · 152f2494
      Mark Brown authored
      Merge series from David Jander <david@protonic.nl>:
      
      These patches optimize the spi_sync call for the common case that the
      worker thread is idle and the queue is empty. It also opens the
      possibility to potentially further optimize the async path also, since
      it doesn't need to take into account the direct sync path anymore.
      
      As an example for the performance gain, on an i.MX8MM SoC with a SPI CAN
      controller attached (MCP2518FD), the time the interrupt line stays
      active (which corresponds roughly with the time it takes to send 3
      relatively short consecutive spi_sync messages) is reduced from 98us to
      only 72us by this patch.
      
      A note about message ordering:
      
      This patch series should not change the behavior of message ordering when
      coming from the same context. This means that if a client driver issues
      one or more spi_async() messages immediately followed by a spi_sync()
      message in the same context, it can still rely on these messages being
      sent out in the order they were fired.
      152f2494
  3. 27 Jun, 2022 18 commits
  4. 23 Jun, 2022 1 commit
  5. 20 Jun, 2022 1 commit
  6. 16 Jun, 2022 1 commit
  7. 14 Jun, 2022 2 commits
  8. 13 Jun, 2022 7 commits
  9. 10 Jun, 2022 3 commits
    • Mark Brown's avatar
      spi: atmel-quadspi: add runtime pm support · c349fad3
      Mark Brown authored
      Merge series from Claudiu Beznea <claudiu.beznea@microchip.com>:
      
      The following series adds runtime PM support for atmel-quadspi driver.
      clk_disable()/clk_enable() is called on proper
      runtime_suspend()/runtime_resume() ops. Along with it 2 minor cleanups
      were added (patches 2/3, 3/3).
      c349fad3
    • David Jander's avatar
      spi: Fix per-cpu stats access on 32 bit systems · 67b9d641
      David Jander authored
      On 32 bit systems, the following kernel BUG is hit:
      
      BUG: using smp_processor_id() in preemptible [00000000] code: swapper/0/1
      caller is debug_smp_processor_id+0x18/0x24
      CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.19.0-rc1-00001-g6ae0aec8a366 #181
      Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
      Backtrace:
       dump_backtrace from show_stack+0x20/0x24
       r7:81024ffd r6:00000000 r5:81024ffd r4:60000013
       show_stack from dump_stack_lvl+0x60/0x78
       dump_stack_lvl from dump_stack+0x14/0x1c
       r7:81024ffd r6:80f652de r5:80bec180 r4:819a2500
       dump_stack from check_preemption_disabled+0xc8/0xf0
       check_preemption_disabled from debug_smp_processor_id+0x18/0x24
       r8:8119b7e0 r7:81205534 r6:819f5c00 r5:819f4c00 r4:c083d724
       debug_smp_processor_id from __spi_sync+0x78/0x220
       __spi_sync from spi_sync+0x34/0x4c
       r10:bb7bf4e0 r9:c083d724 r8:00000007 r7:81a068c0 r6:822a83c0 r5:c083d724
       r4:819f4c00
       spi_sync from spi_mem_exec_op+0x338/0x370
       r5:000000b4 r4:c083d910
       spi_mem_exec_op from spi_nor_read_id+0x98/0xdc
       r10:bb7bf4e0 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:82358040
       r4:819f7c40
       spi_nor_read_id from spi_nor_detect+0x38/0x114
       r7:82358040 r6:00000000 r5:819f7c40 r4:819f7c40
       spi_nor_detect from spi_nor_scan+0x11c/0xbec
       r10:bb7bf4e0 r9:00000000 r8:00000000 r7:c083da4c r6:00000000 r5:00010101
       r4:819f7c40
       spi_nor_scan from spi_nor_probe+0x10c/0x2d0
       r10:bb7bf4e0 r9:bb7bf4d0 r8:00000000 r7:819f4c00 r6:00000000 r5:00000000
       r4:819f7c40
      
      per-cpu access needs to be guarded against preemption.
      
      Fixes: 6598b91b ("spi: spi.c: Convert statistics to per-cpu u64_stats_t")
      Reported-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      Signed-off-by: default avatarDavid Jander <david@protonic.nl>
      Tested-by: default avatarNícolas F. R. A. Prado <nfraprado@collabora.com>
      Link: https://lore.kernel.org/r/20220609121334.2984808-1-david@protonic.nlSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      67b9d641
    • Andy Chiu's avatar
      spi: sifive: add PM callbacks to support suspend/resume · a1f0161e
      Andy Chiu authored
      The patch has been tested on Unmatched using pm_test. The Unmatched board
      uses SD over SPI and it was tested by initiating S2RAM cycles for all
      devices while reading/writing files at the same time. We found no dropped
      connection to the card or corrupted filesystem during test cycles.
      Signed-off-by: default avatarAndy Chiu <andy.chiu@sifive.com>
      Reviewed-by: default avatarGreentime Hu <greentime.hu@sifive.com>
      Link: https://lore.kernel.org/r/20220610074459.3261383-2-andy.chiu@sifive.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      a1f0161e
  10. 09 Jun, 2022 3 commits