linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFT 00/15] tty: serial: switch from circ_buf to kfifo
@ 2024-03-19  9:52 Jiri Slaby (SUSE)
  2024-03-19  9:53 ` [RFT 01/15] kfifo: drop __kfifo_dma_out_finish_r() Jiri Slaby (SUSE)
                   ` (16 more replies)
  0 siblings, 17 replies; 19+ messages in thread
From: Jiri Slaby (SUSE) @ 2024-03-19  9:52 UTC (permalink / raw)
  To: linux-serial
  Cc: linux-kernel, Jiri Slaby (SUSE), Al Cooper, Alexander Shiyan,
	Alexandre Belloni, Alexandre Torgue, Alim Akhtar, Andrew Morton,
	Aneesh Kumar K.V, AngeloGioacchino Del Regno, Baolin Wang,
	Baruch Siach, Bjorn Andersson, Claudiu Beznea, David S. Miller,
	Fabio Estevam, Hammer Hsieh, Christian König,
	Christophe Leroy, Chunyan Zhang, Jerome Brunet, Jonathan Hunter,
	Kevin Hilman, Konrad Dybcio, Krzysztof Kozlowski,
	Kumaravel Thiagarajan, Laxman Dewangan, linux-arm-kernel,
	linux-arm-msm, Maciej W. Rozycki, Manivannan Sadhasivam,
	Martin Blumenstingl, Matthias Brugger, Maxime Coquelin,
	Michael Ellerman, Michal Simek, Naveen N. Rao, Neil Armstrong,
	Nicolas Ferre, Nicholas Piggin, Orson Zhai, Pali Rohár,
	Patrice Chotard, Peter Korsgaard, Richard Genoud, Russell King,
	Sascha Hauer, Shawn Guo, Stefani Seibold, Sumit Semwal,
	Taichi Sugaya, Takao Orito, Tharun Kumar P, Thierry Reding,
	Timur Tabi, Vineet Gupta

This series switches tty serial layer to use kfifo instead of circ_buf.
Excerpt from the switching patch:
"""
Switch from struct circ_buf to proper kfifo. kfifo provides much better
API, esp. when wrap-around of the buffer needs to be taken into account.
Look at pl011_dma_tx_refill() or cpm_uart_tx_pump() changes for example.

Kfifo API can also fill in scatter-gather DMA structures, so it easier
for that use case too. Look at lpuart_dma_tx() for example. Note that
not all drivers can be converted to that (like atmel_serial), they
handle DMA specially.

Note that usb-serial uses kfifo for TX for ages.
"""

This is Request for Testing as I cannot test all the changes
(obviously). So please test your HW's serial properly.

And of course comments welcome.

I will send this as PATCHes later, when -rc1 is out, at earliest.

Cc: Al Cooper <alcooperx@gmail.com>
Cc: Alexander Shiyan <shc_work@mail.ru>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: Alim Akhtar <alim.akhtar@samsung.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@kernel.org>
Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Baruch Siach <baruch@tkos.co.il>
Cc: Bjorn Andersson <andersson@kernel.org>
Cc: Claudiu Beznea <claudiu.beznea@tuxon.dev>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Hammer Hsieh <hammerh0314@gmail.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Chunyan Zhang <zhang.lyra@gmail.com>
Cc: Jerome Brunet <jbrunet@baylibre.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Konrad Dybcio <konrad.dybcio@linaro.org>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Kumaravel Thiagarajan <kumaravel.thiagarajan@microchip.com>
Cc: Laxman Dewangan <ldewangan@nvidia.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-arm-msm@vger.kernel.org
Cc: "Maciej W. Rozycki" <macro@orcam.me.uk>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <michal.simek@amd.com>
Cc: "Naveen N. Rao" <naveen.n.rao@linux.ibm.com>
Cc: Neil Armstrong <neil.armstrong@linaro.org>
Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Orson Zhai <orsonzhai@gmail.com>
Cc: "Pali Rohár" <pali@kernel.org>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Peter Korsgaard <jacmet@sunsite.dk>
Cc: Richard Genoud <richard.genoud@gmail.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Stefani Seibold <stefani@seibold.net>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Taichi Sugaya <sugaya.taichi@socionext.com>
Cc: Takao Orito <orito.takao@socionext.com>
Cc: Tharun Kumar P <tharunkumar.pasumarthi@microchip.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Timur Tabi <timur@kernel.org>
Cc: Vineet Gupta <vgupta@kernel.org>

Jiri Slaby (SUSE) (15):
  kfifo: drop __kfifo_dma_out_finish_r()
  kfifo: introduce and use kfifo_skip_count()
  kfifo: add kfifo_out_linear{,_ptr}()
  kfifo: remove support for physically non-contiguous memory
  kfifo: rename l to len_to_end in setup_sgl()
  kfifo: pass offset to setup_sgl_buf() instead of a pointer
  kfifo: add kfifo_dma_out_prepare_mapped()
  kfifo: fix typos in kernel-doc
  tty: 8250_dma: use dmaengine_prep_slave_sg()
  tty: 8250_omap: use dmaengine_prep_slave_sg()
  tty: msm_serial: use dmaengine_prep_slave_sg()
  tty: serial: switch from circ_buf to kfifo
  tty: atmel_serial: use single DMA mapping for TX
  tty: atmel_serial: define macro for RX size
  tty: atmel_serial: use single DMA mapping for RX

 drivers/tty/serial/8250/8250_bcm7271.c  |  14 +--
 drivers/tty/serial/8250/8250_core.c     |   3 +-
 drivers/tty/serial/8250/8250_dma.c      |  31 +++--
 drivers/tty/serial/8250/8250_exar.c     |   5 +-
 drivers/tty/serial/8250/8250_mtk.c      |   2 +-
 drivers/tty/serial/8250/8250_omap.c     |  48 +++++---
 drivers/tty/serial/8250/8250_pci1xxxx.c |  50 ++++----
 drivers/tty/serial/8250/8250_port.c     |  22 ++--
 drivers/tty/serial/amba-pl011.c         |  46 +++-----
 drivers/tty/serial/ar933x_uart.c        |  15 ++-
 drivers/tty/serial/arc_uart.c           |   8 +-
 drivers/tty/serial/atmel_serial.c       | 150 +++++++++++-------------
 drivers/tty/serial/clps711x.c           |  12 +-
 drivers/tty/serial/cpm_uart.c           |  20 ++--
 drivers/tty/serial/digicolor-usart.c    |  12 +-
 drivers/tty/serial/dz.c                 |  13 +-
 drivers/tty/serial/fsl_linflexuart.c    |  17 +--
 drivers/tty/serial/fsl_lpuart.c         |  39 +++---
 drivers/tty/serial/icom.c               |  25 +---
 drivers/tty/serial/imx.c                |  54 ++++-----
 drivers/tty/serial/ip22zilog.c          |  26 ++--
 drivers/tty/serial/jsm/jsm_cls.c        |  29 ++---
 drivers/tty/serial/jsm/jsm_neo.c        |  38 ++----
 drivers/tty/serial/max3100.c            |  14 +--
 drivers/tty/serial/max310x.c            |  35 +++---
 drivers/tty/serial/men_z135_uart.c      |  26 ++--
 drivers/tty/serial/meson_uart.c         |  11 +-
 drivers/tty/serial/milbeaut_usio.c      |  15 +--
 drivers/tty/serial/msm_serial.c         | 114 +++++++++---------
 drivers/tty/serial/mvebu-uart.c         |   8 +-
 drivers/tty/serial/mxs-auart.c          |  23 +---
 drivers/tty/serial/pch_uart.c           |  21 ++--
 drivers/tty/serial/pic32_uart.c         |  15 ++-
 drivers/tty/serial/pmac_zilog.c         |  24 ++--
 drivers/tty/serial/qcom_geni_serial.c   |  36 +++---
 drivers/tty/serial/rda-uart.c           |  17 +--
 drivers/tty/serial/samsung_tty.c        |  54 +++++----
 drivers/tty/serial/sb1250-duart.c       |  13 +-
 drivers/tty/serial/sc16is7xx.c          |  40 +++----
 drivers/tty/serial/sccnxp.c             |  16 ++-
 drivers/tty/serial/serial-tegra.c       |  43 ++++---
 drivers/tty/serial/serial_core.c        |  56 ++++-----
 drivers/tty/serial/serial_port.c        |   2 +-
 drivers/tty/serial/sh-sci.c             |  51 ++++----
 drivers/tty/serial/sprd_serial.c        |  20 ++--
 drivers/tty/serial/st-asc.c             |   4 +-
 drivers/tty/serial/stm32-usart.c        |  52 ++++----
 drivers/tty/serial/sunhv.c              |  35 +++---
 drivers/tty/serial/sunplus-uart.c       |  16 +--
 drivers/tty/serial/sunsab.c             |  30 ++---
 drivers/tty/serial/sunsu.c              |  15 +--
 drivers/tty/serial/sunzilog.c           |  27 ++---
 drivers/tty/serial/tegra-tcu.c          |  10 +-
 drivers/tty/serial/timbuart.c           |  17 ++-
 drivers/tty/serial/uartlite.c           |  13 +-
 drivers/tty/serial/ucc_uart.c           |  20 ++--
 drivers/tty/serial/xilinx_uartps.c      |  20 ++--
 drivers/tty/serial/zs.c                 |  13 +-
 include/linux/kfifo.h                   | 143 ++++++++++++++++------
 include/linux/serial_core.h             |  49 +++++---
 lib/kfifo.c                             | 107 +++++++++--------
 61 files changed, 944 insertions(+), 960 deletions(-)

-- 
2.44.0


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2024-03-27 16:08 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-19  9:52 [RFT 00/15] tty: serial: switch from circ_buf to kfifo Jiri Slaby (SUSE)
2024-03-19  9:53 ` [RFT 01/15] kfifo: drop __kfifo_dma_out_finish_r() Jiri Slaby (SUSE)
2024-03-19  9:53 ` [RFT 02/15] kfifo: introduce and use kfifo_skip_count() Jiri Slaby (SUSE)
2024-03-19  9:53 ` [RFT 03/15] kfifo: add kfifo_out_linear{,_ptr}() Jiri Slaby (SUSE)
2024-03-19  9:53 ` [PATCH 4/4] kfifo: fix typos in kernel-doc Jiri Slaby (SUSE)
2024-03-19 10:04   ` Jiri Slaby
2024-03-19  9:53 ` [RFT 04/15] kfifo: remove support for physically non-contiguous memory Jiri Slaby (SUSE)
2024-03-19  9:53 ` [RFT 05/15] kfifo: rename l to len_to_end in setup_sgl() Jiri Slaby (SUSE)
2024-03-19  9:53 ` [RFT 06/15] kfifo: pass offset to setup_sgl_buf() instead of a pointer Jiri Slaby (SUSE)
2024-03-19  9:53 ` [RFT 07/15] kfifo: add kfifo_dma_out_prepare_mapped() Jiri Slaby (SUSE)
2024-03-19  9:53 ` [RFT 08/15] kfifo: fix typos in kernel-doc Jiri Slaby (SUSE)
2024-03-19  9:53 ` [RFT 09/15] tty: 8250_dma: use dmaengine_prep_slave_sg() Jiri Slaby (SUSE)
2024-03-19  9:53 ` [RFT 10/15] tty: 8250_omap: " Jiri Slaby (SUSE)
2024-03-19  9:53 ` [RFT 11/15] tty: msm_serial: " Jiri Slaby (SUSE)
2024-03-19  9:53 ` [RFT 12/15] tty: serial: switch from circ_buf to kfifo Jiri Slaby (SUSE)
2024-03-19  9:53 ` [RFT 13/15] tty: atmel_serial: use single DMA mapping for TX Jiri Slaby (SUSE)
2024-03-19  9:53 ` [RFT 14/15] tty: atmel_serial: define macro for RX size Jiri Slaby (SUSE)
2024-03-19  9:53 ` [RFT 15/15] tty: atmel_serial: use single DMA mapping for RX Jiri Slaby (SUSE)
2024-03-27 16:08 ` [RFT 00/15] tty: serial: switch from circ_buf to kfifo Richard Genoud

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).