[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <53095fb1-1093-4db0-8c8b-ef3d7d673628@kernel.org>
Date: Fri, 23 Feb 2024 13:08:13 +0100
From: Jiri Slaby <jirislaby@...nel.org>
To: stefani@...bold.net
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/4] kfifo: small cleanup + linear and skip helpers
On 23. 02. 24, 12:51, Jiri Slaby (SUSE) wrote:
> Hi,
>
> this is a small cleanup of kfifo.
>
> More importantly, it introduces three helpers: kfifo_skip_count(),
> kfifo_out_linear() and kfifo_out_linear_ptr(). They allow using kfifo in
> the serial layer.
>
> They are needed as up to now, there is no way to "peek" the data without
> actually copying to a temporary buffer. kfifo_out_linear*() allow that
> and kfifo_skip_count() then allows for tail moving after the copy is
> done. Note the copy is usually performed directly to hardware e.g. via
> outb(), hence the need for peek without copying anywhere.
Sorry, this reasoning is bogus. outb() would be using kfifo_out(), of
course.
The requirement comes from (for example):
* memcpy_toio() in neo_copy_data_from_queue_to_uart(),
* regmap_noinc_write() in max310x_handle_tx()),
* and similar.
The kfifo data are there directly copied to HW in a batch, without the
need of temp buffers.
thanks,
--
js
suse labs
Powered by blists - more mailing lists