linux-stable/include/linux/spi
David Jander dc3029056b
spi: opportunistically skip ctlr->cur_msg_completion
There are only a few drivers that do not call
spi_finalize_current_message() in the context of transfer_one_message(),
and even for those cases the completion ctlr->cur_msg_completion is not
needed always. The calls to complete() and wait_for_completion() each
take a spin-lock, which is costly. This patch makes it possible to avoid
those calls in the big majority of cases, by introducing two flags that
with the help of ordering via barriers can avoid using the completion
safely. In case of a race with the context calling
spi_finalize_current_message(), the scheme errs on the safe side and takes
the completion.
The impact of this patch is worth the effort: On a i.MX8MM SoC, the time
the SPI bus is idle between two consecutive calls to spi_sync(), is
reduced from 19.6us to 16.8us... roughly 15%.

Signed-off-by: David Jander <david@protonic.nl>
Link: https://lore.kernel.org/r/20220621061234.3626638-12-david@protonic.nl
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-06-27 13:27:26 +01:00
..
ad7877.h
ads7846.h
altera.h
at73c213.h
at86rf230.h
cc2520.h
corgi_lcd.h
ds1305.h
eeprom.h
flash.h
libertas_spi.h
max7301.h gpio: max730x: Make __max730x_remove() return void 2021-10-13 19:52:26 +02:00
mc33880.h
mmc_spi.h
mxs-spi.h
pxa2xx_spi.h spi: pxa2xx_spi: Convert to use GPIO descriptors 2022-01-31 15:17:27 +00:00
rspi.h
s3c24xx-fiq.h
s3c24xx.h spi: s3c24xx: Convert to GPIO descriptors 2022-01-24 13:37:34 +00:00
sh_hspi.h
sh_msiof.h
spi-fsl-dspi.h
spi-mem.h spi: spi-mem: Add an ecc parameter to the spi_mem_op structure 2022-02-10 09:32:30 +01:00
spi.h spi: opportunistically skip ctlr->cur_msg_completion 2022-06-27 13:27:26 +01:00
spi_bitbang.h
spi_gpio.h
spi_oc_tiny.h
tdo24m.h
tle62x0.h
xilinx_spi.h