RFC on writel and writel_relaxed
Linus Torvalds
torvalds at linux-foundation.org
Wed Mar 28 17:14:07 AEDT 2018
On Tue, Mar 27, 2018 at 5:24 PM, Sinan Kaya <okaya at codeaurora.org> wrote:
>
> Basically changing it to
>
> dma_buffer->foo = 1; /* WB */
> wmb()
> writel_relaxed(KICK, DMA_KICK_REGISTER); /* UC */
> mmiowb()
Why?
Why not just remove the wmb(), and keep the barrier in the writel()?
The above code makes no sense, and just looks stupid to me. It also
generates pointlessly bad code on x86, so it's bad there too.
Linus
More information about the Linuxppc-dev
mailing list