1. 04 11月, 2022 1 次提交
  2. 02 11月, 2022 1 次提交
  3. 21 10月, 2022 1 次提交
  4. 28 9月, 2022 1 次提交
  5. 08 9月, 2022 1 次提交
  6. 07 9月, 2022 1 次提交
  7. 02 9月, 2022 1 次提交
    • M
      spi: mux: Fix mux interaction with fast path optimisations · b30f7c8e
      Mark Brown 提交于
      The spi-mux driver is rather too clever and attempts to resubmit any
      message that is submitted to it to the parent controller with some
      adjusted callbacks.  This does not play at all nicely with the fast
      path which now sets flags on the message indicating that it's being
      handled through the fast path, we see async messages flagged as being on
      the fast path.  Ideally the spi-mux code would duplicate the message but
      that's rather invasive and a bit fragile in that it relies on the mux
      knowing which fields in the message to copy.  Instead teach the core
      that there are controllers which can't cope with the fast path and have
      the mux flag itself as being such a controller, ensuring that messages
      going via the mux don't get partially handled via the fast path.
      
      This will reduce the performance of any spi-mux connected device since
      we'll now always use the thread for both the actual controller and the
      mux controller instead of just the actual controller but given that we
      were always hitting the slow path anyway it's hopefully not too much of
      an additional cost and it allows us to keep the fast path.
      
      Fixes: ae7d2346 ("spi: Don't use the message queue if possible in spi_sync")
      Reported-by: NCasper Andersson <casper.casan@gmail.com>
      Tested-by: NCasper Andersson <casper.casan@gmail.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      Link: https://lore.kernel.org/r/20220901120732.49245-1-broonie@kernel.orgSigned-off-by: NMark Brown <broonie@kernel.org>
      b30f7c8e
  8. 30 6月, 2022 1 次提交
  9. 27 6月, 2022 5 次提交
  10. 10 6月, 2022 1 次提交
    • D
      spi: Fix per-cpu stats access on 32 bit systems · 67b9d641
      David Jander 提交于
      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: NMarc Kleine-Budde <mkl@pengutronix.de>
      Signed-off-by: NDavid Jander <david@protonic.nl>
      Tested-by: NNícolas F. R. A. Prado <nfraprado@collabora.com>
      Link: https://lore.kernel.org/r/20220609121334.2984808-1-david@protonic.nlSigned-off-by: NMark Brown <broonie@kernel.org>
      67b9d641
  11. 09 6月, 2022 1 次提交
  12. 06 6月, 2022 2 次提交
  13. 12 5月, 2022 1 次提交
  14. 22 4月, 2022 1 次提交
  15. 28 2月, 2022 1 次提交
  16. 14 2月, 2022 1 次提交
  17. 10 2月, 2022 1 次提交
  18. 09 2月, 2022 1 次提交
  19. 02 2月, 2022 8 次提交
  20. 08 1月, 2022 1 次提交
  21. 14 10月, 2021 1 次提交
    • M
      spi: Fix deadlock when adding SPI controllers on SPI buses · 6098475d
      Mark Brown 提交于
      Currently we have a global spi_add_lock which we take when adding new
      devices so that we can check that we're not trying to reuse a chip
      select that's already controlled.  This means that if the SPI device is
      itself a SPI controller and triggers the instantiation of further SPI
      devices we trigger a deadlock as we try to register and instantiate
      those devices while in the process of doing so for the parent controller
      and hence already holding the global spi_add_lock.  Since we only care
      about concurrency within a single SPI bus move the lock to be per
      controller, avoiding the deadlock.
      
      This can be easily triggered in the case of spi-mux.
      Reported-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      6098475d
  22. 07 10月, 2021 2 次提交
  23. 05 8月, 2021 2 次提交
  24. 12 7月, 2021 1 次提交
  25. 25 6月, 2021 1 次提交
  26. 22 6月, 2021 1 次提交