Re: [PATCH] add delay between port write and port read
From: Linus Torvalds (torvalds@xxxxxxxxxxxxxxxxxxxx)
Date: Fri Mar 01 2019 - 14:19:20 EST
On Fri, Mar 1, 2019 at 11:13 AM Maciej W. Rozycki <macro@xxxxxxxxxxxxxx> wrote:
> What do we do WRT straight-through vs byte-swapping properties of these
I think the whole point of __raw_xyz() is that it's the lowest level
model. It gives you relaxed ordering (together with the ioremap
model), and it gives you straight-through behavior.
And yes, any driver using them needs to be aware of the byte ordering,
which may or may not be the same as regular memory, and may or may not
be the same as other devices.
So __raw_xyz() is very much for low-level drivers that know what they
are doing. Caveat user.
"If it breaks, you get to keep both pieces"