summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-at91-usart.c
diff options
context:
space:
mode:
authorDavid Lechner <dlechner@baylibre.com>2024-02-07 15:51:24 +0100
committerMark Brown <broonie@kernel.org>2024-02-07 16:17:42 +0100
commit531860e12da76a444e0ecfd37a9d786e7986957a (patch)
treee95ab3d6a0f9e4d7513fcc6b2a8ba9574407f98c /drivers/spi/spi-at91-usart.c
parentspi: drop gpf arg from __spi_split_transfer_maxsize() (diff)
downloadlinux-531860e12da76a444e0ecfd37a9d786e7986957a.tar.xz
linux-531860e12da76a444e0ecfd37a9d786e7986957a.zip
spi: axi-spi-engine: remove use of ida for sync id
Profiling has shown that ida_alloc_range() accounts for about 10% of the time spent in spi_sync() when using the AXI SPI Engine controller. This call is used to create a unique id for each SPI message to match to an IRQ when the message is complete. Since the core SPI code serializes messages in a message queue, we can only have one message in flight at a time, namely host->cur_msg. This means that we can use a fixed value instead of a unique id for each message since there can never be more than one message pending at a time. This patch removes the use of ida for the sync id and replaces it with a constant value. This simplifies the driver and improves performance. Reviewed-by: Nuno Sa <nuno.sa@analog.com> Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://lore.kernel.org/r/20240207-axi-spi-engine-round-2-1-v2-1-40c0b4e85352@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-at91-usart.c')
0 files changed, 0 insertions, 0 deletions