linux_dsm_epyc7002/include/linux/spi
Mark Brown 0461a41498 spi: Pump transfers inside calling context for spi_sync()
If we are using the standard SPI message pump (which all drivers should be
transitioning over to) then special case the message enqueue and instead of
starting the worker thread to push messages to the hardware do so in the
context of the caller if the controller is idle. This avoids a context
switch in the common case where the controller has a single user in a
single thread, for short PIO transfers there may be no need to context
switch away from the calling context to complete the transfer.

The code is a bit more complex than is desirable in part due to the need
to handle drivers not using the standard queue and in part due to handling
the various combinations of bus locking and asynchronous submission in
interrupt context.

It is still suboptimal since it will still wake the message pump for each
transfer in order to schedule idling of the hardware and if multiple
contexts are using the controller simultaneously a caller may end up
pumping a message for some random other thread rather than for itself,
and if the thread ends up deferring due to another context idling the
hardware then it will just busy wait.  It can, however, have the benefit
of aggregating power up and down of the hardware when a caller performs
a series of transfers back to back without any need for the use of
spi_async().

Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-11 12:23:51 +00:00
..
ad7877.h
ad7879.h
adi_spi3.h spi: convert spi-bfin-v3.c to a multiplatform driver 2014-04-14 17:45:25 +01:00
ads7846.h
at73c213.h
at86rf230.h at86rf230: use irq_get_trigger_type 2014-04-26 12:20:32 -04:00
cc2520.h ieee802154: cc2520: adds driver for TI CC2520 radio 2014-06-22 21:31:58 -07:00
corgi_lcd.h
ds1305.h
eeprom.h
flash.h
ifx_modem.h
l4f00242t03.h
libertas_spi.h
lms283gf05.h
max7301.h
mc33880.h
mcp23s08.h gpio: mcp23s08 to support both device tree and platform data 2014-09-04 18:59:15 +02:00
mmc_spi.h
mxs-spi.h
pxa2xx_spi.h spi/pxa2xx: Don't use slave_id of dma_slave_config 2014-09-18 11:54:07 +05:30
rspi.h spi: rspi: Remove unused 16-bit DMA support 2014-06-02 15:49:32 +01:00
s3c24xx.h
sh_hspi.h
sh_msiof.h spi: sh-msiof: Add DMA support 2014-06-30 19:54:57 +01:00
spi_bitbang.h spi: bitbang: Make spi_bitbang_stop() return void 2014-03-29 11:09:26 +00:00
spi_gpio.h
spi_oc_tiny.h
spi.h spi: Pump transfers inside calling context for spi_sync() 2014-12-11 12:23:51 +00:00
tdo24m.h
tle62x0.h
tsc2005.h
xilinx_spi.h