[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <6b070948-cf02-4f13-a220-0f6cfa21c41a@app.fastmail.com>
Date: Wed, 02 Oct 2024 11:51:22 +0000
From: "Arnd Bergmann" <arnd@...db.de>
To: "Stefan Eichenberger" <eichest@...il.com>, o.rempel@...gutronix.de,
"Pengutronix Kernel Team" <kernel@...gutronix.de>,
"Andi Shyti" <andi.shyti@...nel.org>, "Shawn Guo" <shawnguo@...nel.org>,
"Sascha Hauer" <s.hauer@...gutronix.de>,
"Fabio Estevam" <festevam@...il.com>, "Frank Li" <Frank.Li@....com>
Cc: linux-i2c@...r.kernel.org, imx@...ts.linux.dev,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
"Francesco Dolcini" <francesco.dolcini@...adex.com>,
"Stefan Eichenberger" <stefan.eichenberger@...adex.com>
Subject: Re: [PATCH v4 3/4] i2c: imx: use readb_relaxed and writeb_relaxed
On Wed, Oct 2, 2024, at 11:19, Stefan Eichenberger wrote:
> From: Stefan Eichenberger <stefan.eichenberger@...adex.com>
>
> Use the relaxed version of readb and writeb to reduce overhead. It is
> safe to use the relaxed version because we either do not rely on dma
> completion, or we use a dma callback to ensure that the dma transfer is
> complete before we continue.
I would still consider this a bug in general, you should
never default to the unsafe variants.
If there is a codepath that needs the barrierless version,
please add imx_i2c_write_reg_relaxed()/imx_i2c_read_reg_relaxed()
helpers that use those only in the places where it makes
a measurable difference, with a comment that explains
the usage.
Arnd
Powered by blists - more mailing lists