All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Diogo Ivo" <diogo.ivo.sx@renesas.com>
Cc: linux-serial@vger.kernel.org
Subject: Re: [PATCH] serial: rsci: Clear TDRE once per TX FIFO refill
Date: Fri, 27 Nov 2026 13:47:54 +0000	[thread overview]
Message-ID: <sashiko-outbox-237514@kernel.org> (raw)
In-Reply-To: <20261127-divo-ssgrlpcsrc-2996-rsci-txi-v1-1-88e1614ea0b8@renesas.com>

> rsci_transmit_chars() clears TDRE before each write to TDR, going
> against what is stated in Figure 7.3-17 of section 7.3.3.8 (Serial
> Data Transmission (Asynchronous Mode)), FIFO mode, of the RZ/G3L
> hardware manual:
> 
>   To continue serial transmission, write all transmit data to
>   the transmit FIFO (TDR) by using a TXI interrupt and clear
>   TDRE flag to 0.
> 
> This leads to two problems: (a) up to (FIFO_SIZE - 1) unnecessary MMIO
> writes to clear TDRE that take a significant amount of time in interrupt
> context and (b) a second TXI interrupt is generated while the first is
> being handled. This is described in the RZ/G3L hardware manual in section
> 7.3.2.2.18 (Common Status Register), under the TDRE bit,
> 
> [ ... ]
> to 4096 TXIs and around 159 ms spent servicing them without this patch.
> With the patch the number of TXIs went down to the expected
> (64KiB / 32) = 2048 which took around 86 ms in total.
> 
> Signed-off-by: Diogo Ivo <diogo.ivo.sx@renesas.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261127-divo-ssgrlpcsrc-2996-rsci-txi-v1-1-88e1614ea0b8@renesas.com?part=1

      reply	other threads:[~2026-11-27 13:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27 13:40 [PATCH] serial: rsci: Clear TDRE once per TX FIFO refill Diogo Ivo
2026-11-27 13:47 ` sashiko-bot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-237514@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=diogo.ivo.sx@renesas.com \
    --cc=linux-serial@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.