Skip to content

tty: serial: switch from circ_buf to kfifo

Jiri Slaby (SUSE) linux-amlogic linux-arm-kernel linux-arm-msm linux-serial lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest15 patches 31 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15kfifo: drop __kfifo_dma_out_finish_r()include/linux/kfifo.h lib/kfifo.c+1 -110 replies
2/15kfifo: introduce and use kfifo_skip_count()include/linux/kfifo.h+15 -160 replies
3/15kfifo: add kfifo_out_linear{,_ptr}()include/linux/kfifo.h lib/kfifo.c+89 -00 replies
4/15kfifo: remove support for physically non-contiguous memorylib/kfifo.c+5 -330 replies
5/15kfifo: rename l to len_to_end in setup_sgl()lib/kfifo.c+4 -40 replies
6/15kfifo: pass offset to setup_sgl_buf() instead of a pointerlib/kfifo.c+7 -40 replies
7/15kfifo: add kfifo_dma_out_prepare_mapped()include/linux/kfifo.h lib/kfifo.c+47 -240 replies
8/15kfifo: fix typos in kernel-docinclude/linux/kfifo.h+5 -50 replies
9/15tty: 8250_dma: use dmaengine_prep_slave_sg()drivers/tty/serial/8250/8250_dma.c+8 -40 replies
10/15tty: 8250_omap: use dmaengine_prep_slave_sg()drivers/tty/serial/8250/8250_omap.c+6 -30 replies
11/15tty: msm_serial: use dmaengine_prep_slave_sg()drivers/tty/serial/msm_serial.c+49 -3712 replies
12/15tty: serial: switch from circ_buf to kfifodrivers/tty/serial/8250/8250_bcm7271.c drivers/tty/serial/8250/8250_core.c drivers/tty/serial/8250/8250_dma.c +56 more+688 -78014 replies
13/15tty: atmel_serial: use single DMA mapping for TXdrivers/tty/serial/atmel_serial.c+14 -210 replies
14/15tty: atmel_serial: define macro for RX sizedrivers/tty/serial/atmel_serial.c+5 -50 replies
15/15tty: atmel_serial: use single DMA mapping for RXdrivers/tty/serial/atmel_serial.c+22 -340 replies

Reviews trailers per patch

1 of 15 patches has a Reviewed-by or Acked-by.

PatchMarek SzyprowskiAnders RoxellJiri Slaby
1/15
2/15
3/15
4/15
5/15
6/15
7/15
8/15
9/15
10/15
11/15T-b T-b
12/15T-b A-b
13/15
14/15
15/15

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 00/15] tty: serial: switch from circ_buf to kfifo

This series switches tty serial layer to use kfifo instead of circ_buf.

The reasoning can be found in the switching patch in this series:
"""
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.
"""

Cc Al Cooper <[email protected]>
Cc Alexander Shiyan <[email protected]>
Cc Alexandre Belloni <[email protected]>
Cc Alexandre Torgue <[email protected]>
Cc Alim Akhtar <[email protected]>
Cc Andrew Morton <[email protected]>
Cc "Aneesh Kumar K.V" <[email protected]>
Cc AngeloGioacchino Del Regno <[email protected]>
Cc Baolin Wang <[email protected]>
Cc Baruch Siach <[email protected]>
Cc Bjorn Andersson <[email protected]>
Cc Claudiu Beznea <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Hammer Hsieh <[email protected]>
Cc "Christian König" <[email protected]>
Cc Christophe Leroy <[email protected]>
Cc Chunyan Zhang <[email protected]>
Cc Jerome Brunet <[email protected]>
Cc Jonathan Hunter <[email protected]>
Cc Kevin Hilman <[email protected]>
Cc Konrad Dybcio <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc Kumaravel Thiagarajan <[email protected]>
Cc Laxman Dewangan <[email protected]>
Cc "Maciej W. Rozycki" <[email protected]>
Cc Manivannan Sadhasivam <[email protected]>
Cc Martin Blumenstingl <[email protected]>
Cc Matthias Brugger <[email protected]>
Cc Maxime Coquelin <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Michal Simek <[email protected]>
Cc "Naveen N. Rao" <[email protected]>
Cc Neil Armstrong <[email protected]>
Cc Nicolas Ferre <[email protected]>
Cc Nicholas Piggin <[email protected]>
Cc Orson Zhai <[email protected]>
Cc "Pali Rohár" <[email protected]>
Cc Patrice Chotard <[email protected]>
Cc Peter Korsgaard <[email protected]>
Cc Richard Genoud <[email protected]>
Cc Russell King <[email protected]>
Cc Sascha Hauer <[email protected]>
Cc Shawn Guo <[email protected]>
Cc Stefani Seibold <[email protected]>
Cc Sumit Semwal <[email protected]>
Cc Taichi Sugaya <[email protected]>
Cc Takao Orito <[email protected]>
Cc Tharun Kumar P <[email protected]>
Cc Thierry Reding <[email protected]>
Cc Timur Tabi <[email protected]>
Cc Vineet Gupta <[email protected]>

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(-)
Signature · 1 line
2.44.0